Module rustc

Module rustc 

Source

Re-exports§

pub use crate::state::*;

Structs§

TypeMap
A map that maps types to values in a generic manner: we store for each type T a value of type M::Value<T>.

Traits§

HasParamEnv
SExpect
SubstBinder
TypeMapper
Defines a mapping from types to types.

Functions§

assoc_tys_for_trait
Generates a list of <trait_ref>::Ty type aliases for each non-gat associated type of the given trait and its parents, in a specific order.
closure_once_shim
drop_glue_shim
dyn_self_ty
Generates a dyn Trait<Args.., Ty = <Self as Trait>::Ty..> type for the given trait ref.
get_closest_parent_type
Gets the closest ancestor of id that is the id of a type.
get_def_attrs
Gets the attributes of the definition.
get_def_visibility
Gets the visibility (pub or not) of the definition. Returns None for defs that don’t have a meaningful visibility.
get_foreign_mod_children
Gets the children of an extern block. Empty if the block is not defined in the current crate.
get_method_sig
The signature of a method impl may be a subtype of the one expected from the trait decl, as in the example below. For correctness, we must be able to map from the method generics declared in the trait to the actual method generics. Because this would require type inference, we instead simply return the declared signature. This will cause issues if it is possible to use such a more-specific implementation with its more-specific type, but we have a few other issues with lifetime-generic function pointers anyway so this is unlikely to cause problems.
get_mod_children
Gets the children of a module.
inst_binder
substitute
translate_span

Trait Aliases§

TypeMappable