Expand description
Attributes for anything that is not name resolution.
The fundamental idea of this module stems from the observation that most “interesting”
attributes have a more memory-compact form than storing their full syntax, and
that most of the attributes are flags, and those that are not are rare. Therefore,
this module defines AttrFlags, which is a bitflag enum that contains only a yes/no
answer to whether an attribute is present on an item. For most attributes, that’s all
that is interesting us; for the rest of them, we define another query that extracts
their data. A key part is that every one of those queries will have a wrapper method
that queries (or is given) the AttrFlags and checks for the presence of the attribute;
if it is not present, we do not call the query, to prevent Salsa from needing to record
its value. This way, queries are only called on items that have the attribute, which is
usually only a few.
Documentation (doc comments and #[doc = "..."] attributes) is handled by the docs
submodule.
Re-exports§
pub use self::docs::Docs;pub use self::docs::IsInnerDoc;
Modules§
- docs
- Documentation extraction and source mapping.
Structs§
Enums§
- DocAtom 🔒
Functions§
- attrs_
from_ 🔒ast_ id_ loc - attrs_
source 🔒 - collect_
attrs 🔒 - collect_
field_ 🔒attrs - crate_
supports_ 🔒no_ std - Whether the crate root declares
#![no_std], looking throughcfg_attrgating. - extract_
cfgs 🔒 - extract_
doc_ 🔒aliases - extract_
doc_ 🔒tt_ attr - extract_
ra_ 🔒completions - extract_
ra_ 🔒macro_ style - extract_
rustc_ 🔒skip_ during_ method_ dispatch - match_
attr_ 🔒flags - merge_
repr 🔒 - next_
doc_ 🔒expr - parse_
extra_ crate_ attrs - parse_
repr_ 🔒tt - parse_
rustc_ 🔒legacy_ const_ generics - resolver_
for_ 🔒attr_ def_ id