Expand description
Defines how the compiler represents types internally.
Two important entities in this module are:
rustc_middle::ty::Ty, used to represent the semantics of a type.rustc_middle::ty::TyCtxt, the central data structure in the compiler.
For more information, see βThe ty module: representing typesβ in the rustc-dev-guide.
Re-exportsΒ§
use std::cmp::Ordering;πuse std::fmt::Debug;πuse std::fmt::Debug;πuse std::hash::Hash;πuse std::hash::Hash;πuse std::hash::Hasher;πuse std::marker::PhantomData;πuse std::num::NonZero;πuse std::ops::ControlFlow;πuse std::ptr::NonNull;πuse std::assert_matches;πuse std::fmt;πuse std::iter;πuse std::str;πpub use generic_args::GenericArgKind;pub use generic_args::TermKind;pub use intrinsic::IntrinsicDef;use rustc_abi::Align;πuse rustc_abi::FieldIdx;πuse rustc_abi::Integer;πuse rustc_abi::IntegerType;πuse rustc_abi::ReprFlags;πuse rustc_abi::ReprOptions;πuse rustc_abi::ScalableElt;πuse rustc_abi::Size;πuse rustc_abi::VariantIdx;πuse rustc_ast as ast;πuse rustc_attr_ir::lang_items::LangItem;πuse rustc_attr_ir as attr;πuse rustc_attr_ir::find_attr;πuse rustc_data_structures::fx::FxHashSet;πuse rustc_data_structures::fx::FxIndexMap;πuse rustc_data_structures::intern::Interned;πuse rustc_data_structures::stable_hash::StableHash;πuse rustc_data_structures::stable_hash::StableHashCtxt;πuse rustc_data_structures::stable_hash::StableHasher;πuse rustc_errors::Diag;πuse rustc_errors::ErrorGuaranteed;πuse rustc_hir as hir;πuse rustc_hir::def::CtorKind;πuse rustc_hir::def::CtorOf;πuse rustc_hir::def::DefKind;πuse rustc_hir::def::Res;πuse rustc_hir::def_id::CrateNum;πuse rustc_hir::def_id::DefId;πuse rustc_hir::def_id::DefIdMap;πuse rustc_hir::def_id::LocalDefId;πuse rustc_index::bit_set::BitMatrix;πuse rustc_index::IndexVec;πuse rustc_index::static_assert_size;πuse rustc_macros::BlobDecodable;πuse rustc_macros::Decodable;πuse rustc_macros::Encodable;πuse rustc_macros::StableHash;πuse rustc_macros::TyDecodable;πuse rustc_macros::TyEncodable;πuse rustc_macros::TypeFoldable;πuse rustc_macros::TypeVisitable;πuse rustc_macros::extension;πuse rustc_serialize::Decodable;πuse rustc_serialize::Encodable;πuse rustc_session::config::OptLevel;πuse rustc_span::def_id::LocalModId;πuse rustc_span::def_id::ModId;πuse rustc_span::hygiene::MacroKind;πuse rustc_span::DUMMY_SP;πuse rustc_span::ExpnKind;πuse rustc_span::Ident;πuse rustc_span::Span;πuse rustc_span::Symbol;πuse rustc_span::bug;πuse rustc_target::callconv::FnAbi;πuse tracing::debug;πuse tracing::instrument;πuse tracing::instrument;πpub use self::closure::BorrowKind;pub use self::closure::CAPTURE_STRUCT_LOCAL;pub use self::closure::CaptureInfo;pub use self::closure::CapturedPlace;pub use self::closure::ClosureTypeInfo;pub use self::closure::MinCaptureInformationMap;pub use self::closure::MinCaptureList;pub use self::closure::RootVariableMinCaptureList;pub use self::closure::UpvarCapture;pub use self::closure::UpvarId;pub use self::closure::UpvarPath;pub use self::closure::analyze_coroutine_closure_captures;pub use self::closure::is_ancestor_or_same_capture;pub use self::closure::place_to_string_for_capture;pub use self::consts::AliasConst;pub use self::consts::AliasConstKind;pub use self::consts::AtomicOrdering;pub use self::consts::Const;pub use self::consts::ConstInt;pub use self::consts::ConstKind;pub use self::consts::ConstToValTreeResult;pub use self::consts::Expr;pub use self::consts::ExprKind;pub use self::consts::LitToConstInput;pub use self::consts::ScalarInt;pub use self::consts::SimdAlign;pub use self::consts::ValTree;pub use self::consts::ValTreeKindExt;pub use self::consts::Value;pub use self::consts::const_lit_matches_ty;pub use self::context::CtxtInterners;pub use self::context::CurrentGcx;pub use self::context::FreeRegionInfo;pub use self::context::GlobalCtxt;pub use self::context::TyCtxt;pub use self::context::TyCtxtFeed;pub use self::context::tls;pub use self::instance::Instance;pub use self::instance::InstanceKind;pub use self::instance::ReifyReason;pub use self::instance::ShimKind;pub(crate) use self::list::RawList;πpub use self::list::List;pub use self::list::ListWithCachedTypeInfo;pub use self::opaque_types::OpaqueTypeKey;pub use self::pattern::Pattern;pub use self::pattern::PatternKind;pub use self::predicate::AliasTerm;pub use self::predicate::AliasTermKind;pub use self::predicate::ArgOutlivesClause;pub use self::predicate::Clause;pub use self::predicate::ClauseKind;pub use self::predicate::CoercePredicate;pub use self::predicate::ExistentialPredicate;pub use self::predicate::ExistentialPredicateStableCmpExt;pub use self::predicate::ExistentialProjection;pub use self::predicate::ExistentialTraitRef;pub use self::predicate::HostEffectClause;pub use self::predicate::NormalizesTo;pub use self::predicate::OutlivesClause;pub use self::predicate::PolyCoercePredicate;pub use self::predicate::PolyExistentialPredicate;pub use self::predicate::PolyExistentialProjection;pub use self::predicate::PolyExistentialTraitRef;pub use self::predicate::PolyProjectionClause;pub use self::predicate::PolyRegionOutlivesClause;pub use self::predicate::PolySubtypePredicate;pub use self::predicate::PolyTraitClause;pub use self::predicate::PolyTraitRef;pub use self::predicate::PolyTypeOutlivesClause;pub use self::predicate::Predicate;pub use self::predicate::PredicateKind;pub use self::predicate::ProjectionClause;pub use self::predicate::RegionConstraint;pub use self::predicate::RegionEqPredicate;pub use self::predicate::RegionOutlivesClause;pub use self::predicate::SubtypePredicate;pub use self::predicate::TraitClause;pub use self::predicate::TraitRef;pub use self::predicate::TypeOutlivesClause;pub use self::region::EarlyParamRegion;pub use self::region::LateParamRegion;pub use self::region::LateParamRegionKind;pub use self::region::Region;pub use self::region::RegionKind;pub use self::sty::Alias;pub use self::sty::AliasTy;pub use self::sty::AliasTyKind;pub use self::sty::Article;pub use self::sty::Binder;pub use self::sty::BoundConst;pub use self::sty::BoundRegion;pub use self::sty::BoundRegionKind;pub use self::sty::BoundTy;pub use self::sty::BoundTyKind;pub use self::sty::BoundVariableKind;pub use self::sty::CanonicalPolyFnSig;pub use self::sty::CoroutineArgsExt;pub use self::sty::EarlyBinder;pub use self::sty::FnSig;pub use self::sty::FnSigKind;pub use self::sty::FreeAliasTy;pub use self::sty::InherentAliasTy;pub use self::sty::InlineConstArgs;pub use self::sty::InlineConstArgsParts;pub use self::sty::OpaqueAliasTy;pub use self::sty::ParamConst;pub use self::sty::ParamTy;pub use self::sty::PlaceholderConst;pub use self::sty::PlaceholderRegion;pub use self::sty::PlaceholderType;pub use self::sty::PolyFnSig;pub use self::sty::ProjectionAliasTy;pub use self::sty::TyKind;pub use self::sty::TypeAndMut;pub use self::sty::TypingMode;pub use self::sty::TypingModeEqWrapper;pub use self::sty::Unnormalized;pub use self::sty::UpvarArgs;pub use self::trait_def::TraitDef;pub use self::typeck_results::CanonicalUserType;pub use self::typeck_results::CanonicalUserTypeAnnotation;pub use self::typeck_results::CanonicalUserTypeAnnotations;pub use self::typeck_results::IsIdentity;pub use self::typeck_results::Rust2024IncompatiblePatInfo;pub use self::typeck_results::SplattedDef;pub use self::typeck_results::TypeckResults;pub use self::typeck_results::UserType;pub use self::typeck_results::UserTypeAnnotationIndex;pub use self::typeck_results::UserTypeKind;use crate::diagnostics::OpaqueHiddenTypeMismatch;πuse crate::diagnostics::TypeMismatchReason;πuse crate::mir::Body;πuse crate::mir::CoroutineLayout;πuse crate::mir::CoroutineSavedLocal;πuse crate::mir::MirPhase;πuse crate::mir::SourceInfo;πuse crate::query::IntoQueryKey;πuse crate::query::Providers;πuse crate::ty;πuse crate::ty::codec::TyDecoder;πuse crate::ty::codec::TyEncoder;πuse crate::ty::fast_reject::SimplifiedType;πuse crate::ty::layout::FnAbiError;πuse crate::ty::layout::LayoutError;πuse crate::ty::print::with_crate_prefix;πuse crate::ty::print::with_crate_prefix;πuse crate::ty::print::with_no_trimmed_paths;πuse crate::ty::print::with_no_trimmed_paths;πuse crate::ty::util::Discr;πuse crate::ty::walk::TypeWalker;πpub use generic_args::*;pub use vtable::*;
ModulesΒ§
- abstract_
const - A subset of a mir body used for const evaluability checking.
- adjustment
- adt π
- assoc π
- cast
- closure π
- codec
- This module contains some shared code for encoding and decoding various
things from the
tymodule, and in particular implements support for βshorthandsβ which allow to have pointers back into the already encoded stream instead of re-encoding the same thing twice. - consts
- context π
- Type context book-keeping.
- data_
structures - diagnostics π
- Diagnostics related methods for
Ty. - elaborate
- elaborate_
impl π - erase_
regions π - error
- fast_
reject - fold π
- generic_
args π - generics π
- impls_
ty π - This module contains
StableHashimplementations for various data types fromrustc_middle::tyin no particular order. - inhabitedness
- This module contains logic for determining whether a type is inhabited or
uninhabited. The
InhabitedPredicatetype captures the minimum information needed to determine whether a type is inhabited given aParamEnvand module ID. - inherent
- Set of traits which are used to emulate the inherent impls that are present in
rustc_middle. It is customary to glob-importrustc_type_ir::inherent::*to bring all of these traits into scope when programming in interner-agnostic settings, and to avoid importing any of these directly elsewhere (i.e. specify the full path for an implementation downstream). - instance π
- intern
- intrinsic π
- ir_
print - lang_
items - layout
- lift
- list π
- normalize_
erasing_ regions - Methods for normalizing when you donβt care about regions (and
arenβt doing type inference). If either of those things donβt
apply to you, use
infcx.normalize(...). - offload_
meta - opaque_
types π - outlives
- The outlives relation
T: 'aor'a: 'b. This code frequently refers to rules defined in RFC 1214 (OutlivesFooBar), so see that RFC for reference. - pattern
- predicate π
- region π
- region_
constraint - The bulk of the logic for implementing
-Zassumptions-on-binders - relate
- search_
graph - The search graph is responsible for caching and cycle detection in the trait solver. Making sure that caching doesnβt result in soundness bugs or unstable query results is very challenging and makes this one of the most-involved self-contained components of the compiler.
- significant_
drop_ order - solve
- structural_
impls π - This module contains implementations of the
Lift,TypeFoldableandTypeVisitabletraits for various types in the Rust compiler. Most are written by hand, though weβve recently added some macros and proc-macros to help with the tedium. - sty
- This module contains
TyKindand its major components. - trait_
def - transmute
- typeck_
results π - typetree
- util
- Miscellaneous type-system utilities that are too small to deserve their own modules.
- visit π
- vtable
- walk
- An iterator over the type substructure. WARNING: this does not keep track of the region depth.
MacrosΒ§
- Trivial
Type Traversal Impls - Used for types that are
Copyand which do not care arena allocated data (i.e., donβt need to be folded). - try_
visit - walk_
visitable_ list
StructsΒ§
- AdtDef
- AdtDef
Data - The definition of a user-defined type, e.g., a
struct,enum, orunion. - AdtFlags
- Assoc
Item - Information about an associated item
- Assoc
Items - A list of
ty::AssocItems in definition order that allows for efficient lookup by name. - Async
Destructor - Bottom
UpFolder - Bound
Var - Bound
VarReplacer - Replaces escaping bound vars in a value.
- CReader
Cache Key - Caller
Bounds Accessor - Canonical
- A βcanonicalizedβ type
Vis one where all free inference variables have been rewritten to βcanonical varsβ. These are numbered starting from 0 in order of first appearance. - Canonical
Param EnvCache - Canonical
Param EnvCache Entry - Canonical
Query Input - Canonical
VarValues - A set of values corresponding to the canonical variables from some
Canonical. You can give these values tocanonical_value.instantiateto instantiate them into the canonical value at the right places. - Canonicalized
- A projection of a
Canonical<V>, as produced byCanonical::project. Useful as a marker when dealing with fields within aCanonical<V>, because it indicates thatTmay contain canonical bound variables that must be instantiated before use. - Canonicalizer
State - State used and modified by a canonicalizer during canonicalization. To avoid many allocations,
this state is reused by many canonicalizers from
GlobalCaches. - Closure
Args - A closure can be modeled as a struct that looks like:
- Closure
Args Parts - Struct returned by
split(). - Closure
Size Profile Data - Const
Conditions [const]bounds for a given item. This is represented using a struct much likeGenericClauses, where you can either choose to only instantiate the βownβ bounds or all of the bounds including those from the parent. This distinction is necessary for code likecompare_method_clause_entailment.- Const
Vid - A
constvariable ID. - Coroutine
Args - Similar to
ClosureArgs; see the above documentation for more. - Coroutine
Args Parts - Coroutine
Closure Args - Coroutine
Closure Args Parts - See docs for explanation of how each argument is used.
- Coroutine
Closure Signature - Coroutine
Witness Types - Crate
Clauses Map - The crate outlives map is computed during typeck and contains the
outlives of every item in the local crate. You should not use it
directly, because to do so will make your pass dependent on the
HIR of every item in the local crate. Instead, use
tcx.inferred_outlives_of()to get the outlives for a particular item. - Crate
Inherent Impls - A map for the local crate mapping each type to a vector of its
inherent impls. This is not meant to be used outside of coherence;
rather, you should request the vector for a specific type via
tcx.inherent_impls(def_id)so as to minimize your dependencies (constructing this map requires touching the entire crate). - Crate
Variances Map - The crate variances map is computed during typeck and contains the
variance of every item in the local crate. You should not use it
directly, because to do so will make your pass dependent on the
HIR of every item in the local crate. Instead, use
tcx.variances_of()to get the variance for a particular item. - Debruijn
Index - A De Bruijn index is a standard means of representing regions (and perhaps later types) in a higher-ranked setting. In particular, imagine a type like this:
- Deep
Reject Ctxt - Given generic arguments, could they be unified after replacing parameters with inference variables or placeholders. This behavior is toggled using the const generics.
- Definition
Site Hidden Type - Delayed
Map - A hashmap which only starts hashing after ignoring the first few inputs.
- Delayed
Set - Destructor
- Destructured
AdtConst - The constituent parts of a type level constant of kind ADT or array.
- Early
Binder Iter - Field
Def - Field
Info - Flag
Computation - Float
Vid - A floating-point (
f32orf64) type variable ID. - FnHeader
- FnMut
Delegate - A simple delegate taking three mutable functions.
- FnSig
Tys - GenSig
- Generic
Arg - An entity in the Rust type system, which can be one of
several kinds (types, lifetimes, and consts).
To reduce memory usage, a
GenericArgis an interned pointer, with the lowest 2 bits being reserved for a tag to indicate the type (Ty,Region, orConst) it points to. - Generic
Args - List of generic arguments that are gonna be used to replace generic parameters.
- Generic
Clauses - Bounds on generics.
- Generic
Param Count - Generic
Param Def - Generics
- Information about the formal type/lifetime parameters associated
with an item or method. Analogous to
hir::Generics. - Impl
Trait Header - Instantiated
Clauses - Represents the bounds declared on a particular set of type
parameters. Should eventually be generalized into a flag list of
where-clauses. You can obtain an
InstantiatedClauseslist from aGenericClausesby using theinstantiatemethod. Note that this method reflects an important semantic invariant ofInstantiatedClauses: while theGenericClausesare expressed in terms of the bound type parameters of the impl/trait/whatever, anInstantiatedClausesinstance represented a set of bounds for some particular instantiation, meaning that the generic parameters have been instantiated with their values. - IntVid
- An integral (
u32,i32,usize, etc.) type variable ID. - IsSuggestable
Visitor - Iter
Identity Copied - Iter
Instantiated - Iter
Instantiated Copied - Make
Suggestable Folder - MayBe
Erased - NoClauses
- Param
Env - When interacting with the type system we must provide information about the
environment.
ParamEnvis the type that represents this information. See the dev guide chapter for more information. - Param
EnvAnd - Placeholder
- The βplaceholder indexβ fully defines a placeholder region, type, or const. Placeholders are identified by both a universe, as well as a name residing within that universe. Distinct bound regions/types/consts within the same universe simply have an unknown relationship to one
- Provisional
Hidden Type - Pseudo
Canonical Input - Similar to
CanonicalInput, this carries thetyping_modeand the environment necessary to do any kind of trait solving inside of nested queries. - Region
Folder - Folds over the substructure of a type, visiting its component types and all regions that occur free within it.
- Region
Vid - A region variable ID.
- Required
Depth - Symbol
Name - Term
- Trait
Object Visitor - Collect al types that have an implicit
'staticobligation that we could suggest'_for. - Ty
- Use this rather than
TyKind, whenever possible. - TyVid
- A type variable ID.
- Type
Flags - Flags that we track on types. These flags are propagated upwards through the type during type construction, so that we can quickly check whether the type has various kinds of types in it without recursing over the type itself.
- Typing
Env - The environment in which to do trait solving.
- Universe
Index - βUniversesβ are used during type- and trait-checking in the
presence of
for<..>binders to control what sets of names are visible. Universes are arranged into a tree: the root universe contains names that are always visible. Each child then adds a new set of names that are visible, in addition to those of its parent. We say that the child universe βextendsβ the parent universe with new names. - Unsafe
Binder Inner - User
Args - Stores the user-given args to reach some fully qualified path
(e.g.,
<T>::Itemor<T as Trait>::Item). - User
Self Ty - Specifies the user-given self type. In the case of a path that refers to a member in an inherent impl, this self type is sometimes needed to constrain the type parameters on the impl. For example, in this code:
- Validate
Bound Vars - Variant
Def - Definition of a variant β a structβs fields or an enum variant.
- Variant
Flags - With
Cached Type Info - A helper type that you can wrap round your own type in order to automatically cache the type flags and debruijn index on creation and not recompute it whenever the information is needed.
EnumsΒ§
- AdtKind
- Anon
Const Kind - Assoc
Container - Assoc
Kind - Assoc
Tag - Like
AssocKind, but just the tag, no fields. Used in various kinds of matching. - Assoc
Type Data - Asyncness
- Bound
Constness - Bound
VarIndex Kind - Okay, we do something fun for
Boundtypes/regions/consts: Specifically, we distinguish between canonically bound things andfor<>bound things. And, really, it comes down to caching during canonicalization and instantiation. - Candidate
Preference Mode - Which trait candidates should be preferred over other candidates? By default, prefer where bounds over alias bounds. For marker traits, prefer alias bounds over where bounds.
- Canonical
VarKind - Information about a canonical variable that is included with the canonical value. This is sufficient information for code to create a copy of the canonical value in some other inference context, with fresh inference variables replacing the canonical values.
- Cant
BeErased - Clause
Polarity - Polarity for a trait clause.
- Closure
Kind - Represents the various closure traits in the language. This
will determine the type of the environment (
self, in the desugaring) argument that the closure expects. - Const
Eval Err - Errors from CTFE we care about in next-solver.
- Defining
Scope Kind - Whether weβre currently in HIR typeck or MIR borrowck.
- FloatTy
- Float
VarValue - Generic
Param DefKind - Impl
Overlap Kind - Impl
Polarity - Impl
Trait InTrait Data - Useful source information about where a desugared associated type for an RPITIT originated from.
- Include
Sized Implicit Bounds - Infer
Const - An inference variable for a const, for use in const generics.
- InferTy
- A placeholder for a type that hasnβt been inferred yet.
- IntTy
- IntVar
Value - IsRigid
- Whether an alias type is rigid or potentially normalizeable.
- Movability
- The movability of a coroutine / closure literal:
whether a coroutine contains self-references, causing it to be
!Unpin. - Mutability
- Pinnedness
- Restriction
Kind - Sized
Trait Kind - Which sizedness trait -
Sized,MetaSized?PointeeSizedis omitted as it is removed during lowering. - Splatted
ArgIndex Error - Error type for splatted argument index errors.
- Suggest
Changing Constraints Message - UintTy
- ValTree
Kind - This datastructure is used to represent the value of constants used in the type system.
- Variance
- Variance
Diag Info - Extra information about why we ended up with a particular variance.
This is only used to add more information to error messages, and
has no effect on soundness. While choosing the βwrongβ
VarianceDiagInfomay lead to confusing notes in error messages, it will never cause a miscompilation or unsoundness. - Variant
Discr - Visibility
- Visible
ForLeak Check - Whether the given region constraint should be considered/ignored for
leak check. In most part of the compiler, this should be
Yes, except for applying constraints from the nested goals in next-solver.Unreachableis used in places in which leak check isnβt done, e.g. borrowck.
ConstantsΒ§
TraitsΒ§
- Bound
VarReplacer Delegate - A delegate used when instantiating bound vars.
- Caller
Bounds Iterator - Collect
AndApply - Imagine you have a function
F: FnOnce(&[T]) -> R, plus an iteratoriterthat producesTitems. You could combine them withf(&iter.collect::<Vec<_>>()), but this requires allocating memory for theVec. - Fallible
Type Folder - This trait is implemented for every folding traversal. There is a fold method defined for every type of interest. Each such method has a default that does an βidentityβ fold.
- Flags
- Generic
ArgPack Ext - Generic
Type Visitable - This trait is implemented for every type that can be visited, providing the skeleton of the traversal.
- Infer
Ctxt Like InferCtxtLikeis one of the two traits abstracting over the InferCtxt, which had to be split due to coherence reasons:- Interner
- The central trait in the shared abstraction layer, specifying all implementation-specific details for rustc and rust-analyzer.
- Interner
Decoder - A decoder that can reconstruct interned type IR values by supplying the interner that owns the decoded data.
- IsSuggestable
- Lift
- A trait implemented for all
X<'a>types that can be safely and efficiently converted toX<'tcx>as long as they are part of the providedTyCtxt<'tcx>. This can be done, for example, forTy<'tcx>orGenericArgsRef<'tcx>by looking them up in their respective interners. - Lift
Into - An interner whose associated types can be lifted into another interner
J. - Predicate
Proxy - Fold predicate deliberately doesnβt get access
to an actual predicate. This way, we can compress lists of predicates, and hide
this detail to folders. Instead, some type implementing this trait,
PredicateProxyis passed, with its limited API. - Term
Kind Pack Ext - Type
Foldable - This trait is implemented for every type that can be folded, providing the skeleton of the traversal.
- Type
Folder - This trait is implemented for every infallible folding traversal. There is
a fold method defined for every type of interest. Each such method has a
default that does an βidentityβ fold. Implementations of these methods
often fall back to a
super_fold_withmethod if the primary argument doesnβt satisfy a particular condition. - Type
Super Foldable - Type
Super Visitable - Type
Visitable - This trait is implemented for every type that can be visited, providing the skeleton of the traversal.
- Type
Visitable Ext - Type
Visitor - This trait is implemented for every visiting traversal. There is a visit method defined for every type of interest. Each such method has a default that recurses into the typeβs fields in a non-custom fashion.
- Typing
Mode Erased Status - Upcast
- An
Into-like trait that takesTyCtxtto perform interner-specific transformations. - Upcast
From - A
From-like trait that takesTyCtxtto perform interner-specific transformations. - Visitor
Result - Similar to the
Trytrait, but also implemented for().
FunctionsΒ§
- debug_
bound_ var - fold_
regions - max_
universe - The largest universe a variable or placeholder was from in
t - max_
universe_ of_ infer_ vars - The largest universe a variable was from in
t - max_
universe_ of_ placeholders - The largest universe a placeholder was from in
t - may_
use_ unstable_ feature - provide
- replace_
escaping_ bound_ vars_ uncached - Replaces escaping bound vars using
delegate. - set_
aliases_ to_ non_ rigid - This function should ideally only be used if either the
TypingModeor theParamEnvdiffers from the environment the aliases were normalized in. - set_
aliases_ to_ rigid - set_
opaques_ to_ non_ rigid - set_
type_ aliases_ to_ rigid - shift_
bound_ var_ indices - Shifts escaping bound-variable indices by
bound_varswithout changing their De Bruijn depth. - shift_
region - shift_
vars - suggest_
arbitrary_ trait_ bound - suggest_
changing_ unsized_ bound - suggest_
constraining_ type_ param - Suggest restricting a type param with a new bound.
- suggest_
constraining_ type_ params - Suggest restricting a type param with a new bound.