Skip to main content

Module ty

Module ty 

Source

Re-exportsΒ§

use rustc_data_structures::fx::FxHashSet; πŸ”’
use rustc_hir as hir; πŸ”’
use rustc_hir::def::DefKind; πŸ”’
use rustc_index::bit_set::DenseBitSet; πŸ”’
use rustc_infer::infer::TyCtxtInferExt; πŸ”’
use rustc_middle::query::Providers; πŸ”’
use rustc_middle::ty; πŸ”’
use rustc_middle::ty::SizedTraitKind; πŸ”’
use rustc_middle::ty::Ty; πŸ”’
use rustc_middle::ty::TyCtxt; πŸ”’
use rustc_middle::ty::TypeSuperVisitable; πŸ”’
use rustc_middle::ty::TypeVisitable; πŸ”’
use rustc_middle::ty::TypeVisitor; πŸ”’
use rustc_middle::ty::Unnormalized; πŸ”’
use rustc_middle::ty::Upcast; πŸ”’
use rustc_middle::ty::fold_regions; πŸ”’
use rustc_span::def_id::CRATE_DEF_ID; πŸ”’
use rustc_span::def_id::DefId; πŸ”’
use rustc_span::def_id::LocalDefId; πŸ”’
use rustc_span::DUMMY_SP; πŸ”’
use rustc_span::bug; πŸ”’
use rustc_trait_selection::traits; πŸ”’
use tracing::instrument; πŸ”’
use tracing::instrument; πŸ”’

StructsΒ§

ImplTraitInTraitFinder πŸ”’
Walk through a function type, gathering all RPITITs and installing a NormalizesTo(Projection(RPITIT) -> Opaque(RPITIT)) predicate into the predicates list. This allows us to observe that an RPITIT projects to its corresponding opaque within the body of a default-body trait method.

FunctionsΒ§

adt_sizedness_constraint πŸ”’
Returns the type of the last field of a struct (β€œthe constraint”) which must implement the sizedness trait for the whole ADT to be considered to implement that sizedness trait. def_id is assumed to be the AdtDef of a struct and will panic otherwise.
asyncness πŸ”’
Check if a function is async.
defaultness πŸ”’
impl_self_is_guaranteed_unsized πŸ”’
param_env πŸ”’
See ParamEnv struct definition for details.
param_env_normalized_for_post_analysis πŸ”’
provide πŸ”’
sizedness_constraint_for_ty πŸ”’
If ty implements the given sizedness trait, returns None. Otherwise, returns the type that must implement the given sizedness for ty to implement it.
unsizing_params_for_adt πŸ”’