Module rustc_attr::builtin
source Β· Expand description
Parsing and validation of builtin attributes
Structs§
- Represents the
#[rustc_const_unstable]
and#[rustc_const_stable]
attributes. - Represents the
#[rustc_default_body_unstable]
attribute. - Represents the following attributes:
Enums§
- Release in which an API is deprecated.
- The available stability levels.
- Rust release in which a feature is stabilized.
Constants§
- The version placeholder that recently stabilized features contain inside the
since
field of the#[stable]
attribute.
Functions§
- allow_
unstable π - Tests if a cfg-pattern matches the cfg set
- Evaluate a cfg-like condition (with
any
andall
), usingeval
to evaluate individual items. - Collects stability info from
rustc_default_body_unstable
attributes inattrs
. ReturnsNone
if no stability attributes are found. - Collects stability info from
rustc_const_stable
/rustc_const_unstable
/rustc_promotable
attributes inattrs
. ReturnsNone
if no stability attributes are found. - Finds the deprecation attribute.
None
if none exists. - Parse #[repr(β¦)] forms.
- Collects stability info from
stable
/unstable
/rustc_allowed_through_unstable_modules
attributes inattrs
. ReturnsNone
if no stability attributes are found. - gate_
cfg π - insert_
or_ πerror - int_
type_ πof_ word - Read the content of a
rustc_confusables
attribute, and return the list of candidate names. - parse_
stability πRead the content of astable
/rustc_const_stable
attribute, and return the feature name and its stability information. - parse_
unstability πRead the content of aunstable
/rustc_const_unstable
/rustc_default_body_unstable
attribute, and return the feature name and its stability information. - Parse a rustc version number written inside string literal in an attribute, like appears in
since = "1.0.0"
. Suffixes like β-devβ and β-nightlyβ are not accepted in this position, unlike when parsing CFG_RELEASE. - try_
gate_ πcfg