Re-exportsยง
use rustc_ast::attr::AttrIdGenerator;๐use rustc_ast::tokenstream::TokenStream;๐use rustc_ast::AttrKind;๐use rustc_ast::Expr;๐use rustc_ast::SyntheticAttr;๐use rustc_ast::ast;๐use rustc_attr_ir::CfgEntry;๐use rustc_attr_parsing as attr;๐use rustc_attr_parsing::CfgSelectBranches;๐use rustc_attr_parsing::parse_cfg_select;๐use rustc_expand::base::DummyResult;๐use rustc_expand::base::ExpandResult;๐use rustc_expand::base::ExtCtxt;๐use rustc_expand::base::MacResult;๐use rustc_expand::base::MacroExpanderResult;๐use rustc_expand::expand::DeclaredIdents;๐use rustc_span::Ident;๐use rustc_span::Span;๐use rustc_span::sym;๐use smallvec::SmallVec;๐use crate::diagnostics::CfgSelectNoMatches;๐
Macrosยง
Structsยง
- CfgSelect
Result ๐ - This intermediate structure is used to emit parse errors for the branches that are not chosen.
The
MacResultinstance below parses all branches, emitting any errors it encounters, but only keeps the parse result for the selected branch.
Functionsยง
- expand_
cfg_ ๐select - mk_attr ๐
- Construct a
#[<cfg_trace>]attribute from aCfgEntry. This allows us to keep track of items that were behind acfg_select!, which is relevant for some diagnostics. - tts_
to_ ๐mac_ result