Expand description
This crate contains implementations of built-in macros and other code generating facilities injecting code into the crate before it is lowered to HIR.
Re-exportsΒ§
pub(crate) use std::sync::Arc;πpub(crate) use MacroExpanderFn;πpub(crate) use ResolverExpand;πpub(crate) use SyntaxExtensionKind;πpub(crate) use rustc_expand::proc_macro::BangProcMacro;πpub(crate) use rustc_span::sym;π
ModulesΒ§
- alloc_
error_ πhandler - asm
- assert π
- autodiff π
- This module contains the implementation of the
#[autodiff]attribute. Currently our linter isnβt smart enough to see that each import is used in one of the two configs (autodiff enabled or disabled), so we have to add cfgβs to each import. FIXME(ZuseZ4): Remove this once we have a smarter linter. - cfg π
- The compiler code necessary to support the cfg! extension, which expands to
a literal
trueorfalsebased on whether the given cfg matches the current compilation environment. - cfg_
accessible π - Implementation of the
#[cfg_accessible(path)]attribute macro. - cfg_
eval π - cfg_
select π - clone π
- cmdline_
attrs - Attributes injected into the crate root from command line using
-Z crate-attr. - coerce_
pointee π - compile_
error π - concat π
- concat_
bytes π - const_
param_ πty - contracts
- copy π
- debug π
- default π
- define_
opaque π - derive π
- deriving π
- The compiler code necessary to implement the
#[derive]extensions. - diagnostics π
- edition_
panic π - eii π
- env π
- eq π
- format π
- format_
foreign π - from π
- gca π
- generic π
- Some code that abstracts away much of the boilerplate of writing
deriveinstances for traits. Among other things it manages getting access to the fields of the 4 different sorts of structs and enum variants, as well as creating the method and impl ast instances. - global_
allocator π - hash π
- iter π
- log_
syntax π - offload π
- ord π
- partial_
eq π - partial_
ord π - pattern_
type π - proc_
macro_ harness - reborrow π
- rustdoc_
skip_ πbody - The expansion from a function when the code would not compile with rustdoc: so if
cfg(doc), expands to aloop {}. - source_
util π - The implementation of built-in macros which relate to the file system.
- standard_
library_ imports - test π
- The expansion from a test function to the appropriate test struct for libtest Ideally, this code would be in libtest but for efficiency and error messages it lives here.
- test_
binder_ πconstraints - test_
harness - trace_
macros π - util
- view_
type π
MacrosΒ§
StructsΒ§
- Builtin
Derive π
FunctionsΒ§
- assert_
ty_ πbounds - call_
discriminant_ πvalue - Constructs an expression that calls the
discriminant_valueintrinsic. - call_
unreachable π - Constructs an expression that calls the
unreachableintrinsic. - register_
builtin_ macros
Type AliasesΒ§
- Builtin
Derive πFn