Skip to main content

Module rustc_utils

Module rustc_utils 

Source

Traitsยง

HasParamEnv
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.
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_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 ๐Ÿ”’
inst_binder
substitute