Skip to main content

Module rustc

Module rustc 

Source

Re-exports§

pub use crate::frontend::state::*;

Traits§

SubstBinder

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.
can_have_generics
Whether the item can have generic parameters.
drop_glue_shim
dyn_self_ty
Generates a dyn Trait<Args.., Ty = <Self as Trait>::Ty..> type for the given trait ref.
fn_sig_bound_region_variances
Computes the variance of each region bound by sig.
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.
get_variant_kind
identity_args_with_inferred
Closures and inline consts have special type params that are used as inference variables. After analysis, they can be computed from the rest of the args (modulo some erased regions). This computes the identity args for this def_id with the inference ars properly inferred.
inst_binder
Instantiate this binder with the provided args. Use None if the args are known to be the identity args.
match_region_args
Takes two values that differ only in their regions, where template has placeholder regions used each once in the places that they differ. Returns a mapping from those placeholders to the corresponding regions in actual.
substitute
Instantiate this value with the provided args. Use None if the args are known to be the identity args.
translate_user_annotation
Convert a type annotation into data we can use, by fetching the types that rustc inferred and gathering the predicates that still need to be checked at borrowck time.
type_alias_trait_clauses
Collects the trait clauses needed to make a type alias well-formed, as Rust itself does not require type aliases to declare the clauses they use.
unerase_lifetimes
Replace each erased region in this value with a fresh placeholder region.

Type Aliases§

UserAnnotation
The data of a user annotation, bound in an existentially-quantified binder.
UserAnnotationData
The data of a user annotation: for each used projection we get the type of the corresponding place, and we record outlives predicates that must hold. The first vec matches the input list of projections, the second is free-form.
UserAnnotationProj
Denotes a subplace of a user annotation, e.g. in let Foo { x, .. }: Self = ...; the annotation will have a projection for x.