Crate rustc_attr[−][src]
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
Modules
Parsing and validation of builtin attributes
Structs
Represents the #[rustc_const_unstable]
and #[rustc_const_stable]
attributes.
Represents the following attributes:
Enums
The available stability levels.
Traits
Requirements for a StableHashingContext
to be used in this crate.
This is a hack to allow using the HashStable_Generic
derive macro
instead of implementing everything in rustc_middle
.
Functions
Tests if a cfg-pattern matches the cfg set
Evaluate a cfg-like condition (with any
and all
), using eval
to
evaluate individual items.
Finds the deprecation attribute. None
if none exists.
Parse #[repr(…)] forms.
Collects stability info from all stability attributes in attrs
.
Returns None
if no stability attributes are found.
Returns an inner attribute with the given value and span.
Returns an outer attribute with the given value and span.