Crate rustc_attr
source ·Expand description
Functions and types dealing with attributes and meta items.
FIXME(Centril): For now being, much of the logic is still in rustc_ast::attr
.
The goal is to move the definition of MetaItem
and things that don’t need to be in syntax
to this crate.
Re-exports§
pub use IntType::*;
pub use ReprAttr::*;
pub use StabilityLevel::*;
Modules§
- builtin 🔒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.
Statics§
- Raw content of Fluent resource for this crate, generated by
fluent_messages
macro, imported byrustc_driver
to include all crates’ resources in one bundle.
Functions§
- 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. - Read the content of a
rustc_confusables
attribute, and return the list of candidate names.