Skip to main content

Crate rustc_builtin_macros

Crate rustc_builtin_macros 

Source
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 true or false based 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 derive instances 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 a loop {}.
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Β§

path_std πŸ”’
pathvec πŸ”’

StructsΒ§

BuiltinDerive πŸ”’

FunctionsΒ§

assert_ty_bounds πŸ”’
call_discriminant_value πŸ”’
Constructs an expression that calls the discriminant_value intrinsic.
call_unreachable πŸ”’
Constructs an expression that calls the unreachable intrinsic.
register_builtin_macros

Type AliasesΒ§

BuiltinDeriveFn πŸ”’