Struct rustc::infer::canonical::canonicalizer::Canonicalizer [−][src]
struct Canonicalizer<'cx, 'gcx: 'tcx, 'tcx: 'cx> { infcx: Option<&'cx InferCtxt<'cx, 'gcx, 'tcx>>, tcx: TyCtxt<'cx, 'gcx, 'tcx>, variables: SmallVec<[CanonicalVarInfo; 8]>, var_values: &'cx mut SmallCanonicalVarValues<'tcx>, indices: FxHashMap<Kind<'tcx>, CanonicalVar>, canonicalize_region_mode: CanonicalizeRegionMode, needs_canonical_flags: TypeFlags, }
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
Fields
infcx: Option<&'cx InferCtxt<'cx, 'gcx, 'tcx>>
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
tcx: TyCtxt<'cx, 'gcx, 'tcx>
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
variables: SmallVec<[CanonicalVarInfo; 8]>
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
var_values: &'cx mut SmallCanonicalVarValues<'tcx>
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
indices: FxHashMap<Kind<'tcx>, CanonicalVar>
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
canonicalize_region_mode: CanonicalizeRegionMode
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
needs_canonical_flags: TypeFlags
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
Methods
impl<'cx, 'gcx, 'tcx> Canonicalizer<'cx, 'gcx, 'tcx>
[src]
impl<'cx, 'gcx, 'tcx> Canonicalizer<'cx, 'gcx, 'tcx>
fn canonicalize<V>(
value: &V,
infcx: Option<&'cx InferCtxt<'cx, 'gcx, 'tcx>>,
tcx: TyCtxt<'cx, 'gcx, 'tcx>,
canonicalize_region_mode: CanonicalizeRegionMode,
var_values: &'cx mut SmallCanonicalVarValues<'tcx>
) -> Canonicalized<'gcx, V> where
V: TypeFoldable<'tcx> + Lift<'gcx>,
[src]
fn canonicalize<V>(
value: &V,
infcx: Option<&'cx InferCtxt<'cx, 'gcx, 'tcx>>,
tcx: TyCtxt<'cx, 'gcx, 'tcx>,
canonicalize_region_mode: CanonicalizeRegionMode,
var_values: &'cx mut SmallCanonicalVarValues<'tcx>
) -> Canonicalized<'gcx, V> where
V: TypeFoldable<'tcx> + Lift<'gcx>,
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
The main canonicalize
method, shared impl of
canonicalize_query
and canonicalize_response
.
fn canonical_var(
&mut self,
info: CanonicalVarInfo,
kind: Kind<'tcx>
) -> CanonicalVar
[src]
fn canonical_var(
&mut self,
info: CanonicalVarInfo,
kind: Kind<'tcx>
) -> CanonicalVar
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
Creates a canonical variable replacing kind
from the input,
or returns an existing variable if kind
has already been
seen. kind
is expected to be an unbound variable (or
potentially a free region).
fn canonicalize_ty_var(
&mut self,
ty_kind: CanonicalTyVarKind,
ty_var: Ty<'tcx>
) -> Ty<'tcx>
[src]
fn canonicalize_ty_var(
&mut self,
ty_kind: CanonicalTyVarKind,
ty_var: Ty<'tcx>
) -> Ty<'tcx>
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
Given a type variable ty_var
of the given kind, first check
if ty_var
is bound to anything; if so, canonicalize
that. Otherwise, create a new canonical variable for
ty_var
.
Trait Implementations
impl<'cx, 'gcx, 'tcx> TypeFolder<'gcx, 'tcx> for Canonicalizer<'cx, 'gcx, 'tcx>
[src]
impl<'cx, 'gcx, 'tcx> TypeFolder<'gcx, 'tcx> for Canonicalizer<'cx, 'gcx, 'tcx>
fn tcx<'b>(&'b self) -> TyCtxt<'b, 'gcx, 'tcx>
[src]
fn tcx<'b>(&'b self) -> TyCtxt<'b, 'gcx, 'tcx>
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
fn fold_region(&mut self, r: Region<'tcx>) -> Region<'tcx>
[src]
fn fold_region(&mut self, r: Region<'tcx>) -> Region<'tcx>
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
fn fold_ty(&mut self, t: Ty<'tcx>) -> Ty<'tcx>
[src]
fn fold_ty(&mut self, t: Ty<'tcx>) -> Ty<'tcx>
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
fn fold_binder<T>(&mut self, t: &Binder<T>) -> Binder<T> where
T: TypeFoldable<'tcx>,
[src]
fn fold_binder<T>(&mut self, t: &Binder<T>) -> Binder<T> where
T: TypeFoldable<'tcx>,
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
fn fold_const(&mut self, c: &'tcx Const<'tcx>) -> &'tcx Const<'tcx>
[src]
fn fold_const(&mut self, c: &'tcx Const<'tcx>) -> &'tcx Const<'tcx>
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
Auto Trait Implementations
impl<'cx, 'gcx, 'tcx> !Send for Canonicalizer<'cx, 'gcx, 'tcx>
impl<'cx, 'gcx, 'tcx> !Send for Canonicalizer<'cx, 'gcx, 'tcx>
impl<'cx, 'gcx, 'tcx> !Sync for Canonicalizer<'cx, 'gcx, 'tcx>
impl<'cx, 'gcx, 'tcx> !Sync for Canonicalizer<'cx, 'gcx, 'tcx>