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
sincefield of the#[stable]attribute.
FunctionsΒ§
- allow_unstable π
- Tests if a cfg-pattern matches the cfg set
- Evaluate a cfg-like condition (with
anyandall), usingevalto evaluate individual items. - Collects stability info from
rustc_default_body_unstableattributes inattrs. ReturnsNoneif no stability attributes are found. - Collects stability info from
rustc_const_stable/rustc_const_unstable/rustc_promotableattributes inattrs. ReturnsNoneif no stability attributes are found. - Finds the deprecation attribute.
Noneif none exists. - Parse #[repr(β¦)] forms.
- Collects stability info from
stable/unstable/rustc_allowed_through_unstable_modulesattributes inattrs. ReturnsNoneif no stability attributes are found. - gate_cfg π
- insert_or_error π
- int_type_of_word π
- Read the content of a
rustc_confusablesattribute, and return the list of candidate names. - parse_stability πRead the content of a
stable/rustc_const_stableattribute, and return the feature name and its stability information. - parse_unstability πRead the content of a
unstable/rustc_const_unstable/rustc_default_body_unstableattribute, and return the feature name and its stability information. - parse_version π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 π