Module syntax::attr [] [src]

Unstable (rustc_private)

Reexports

pub use self::StabilityLevel::*;
pub use self::ReprAttr::*;
pub use self::IntType::*;

Structs

Deprecation [Unstable]
RustcDeprecation [Unstable]
Stability [Unstable]

Represents the #[stable], #[unstable] and #[rustc_deprecated] attributes.

Enums

InlineAttr [Unstable]
IntType [Unstable]
ReprAttr [Unstable]
StabilityLevel [Unstable]

The available stability levels.

Traits

AttrMetaMethods [Unstable]
AttributeMethods [Unstable]
AttributesExt [Unstable]
ThinAttributesExt [Unstable]
WithAttrs [Unstable]

A cheap way to add Attributes to an AST node.

Functions

cfg_matches [Unstable]

Tests if a cfg-pattern matches the cfg set

contains [Unstable]

Check if needle occurs in haystack by a structural comparison. This is slightly subtle, and relies on ignoring the span included in the == comparison a plain MetaItem.

contains_extern_indicator [Unstable]
contains_name [Unstable]
find_crate_name [Unstable]
find_deprecation [Unstable]

Find the deprecation attribute. None if none exists.

find_export_name_attr [Unstable]

Find the value of #[export_name=*] attribute and check its validity.

find_inline_attr [Unstable]

Determine what #[inline] attribute is present in attrs, if any.

find_repr_attrs [Unstable]

Parse #[repr(...)] forms.

find_stability [Unstable]

Find the first stability attribute. None if none exists.

first_attr_value_str_by_name [Unstable]
is_used [Unstable]
last_meta_item_value_str_by_name [Unstable]
mark_used [Unstable]
mk_attr_id [Unstable]
mk_attr_inner [Unstable]

Returns an inner attribute with the given value.

mk_attr_outer [Unstable]

Returns an outer attribute with the given value.

mk_list_item [Unstable]
mk_name_value_item [Unstable]
mk_name_value_item_str [Unstable]
mk_sugared_doc_attr [Unstable]
mk_word_item [Unstable]
requests_inline [Unstable]

True if #[inline] or #[inline(always)] is present in attrs.

require_unique_names [Unstable]
sort_meta_items [Unstable]

Type Definitions

ThinAttributes [Unstable]

A list of attributes, behind a optional box as a space optimization.