Struct rustc::infer::combine::Generalizer [−][src]
struct Generalizer<'cx, 'gcx: 'cx + 'tcx, 'tcx: 'cx> {
infcx: &'cx InferCtxt<'cx, 'gcx, 'tcx>,
span: Span,
for_vid_sub_root: TyVid,
ambient_variance: Variance,
needs_wf: bool,
root_ty: 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?
Fields
infcx: &'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?
span: Span
🔬 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?
Span, used when creating new type variables and things.
for_vid_sub_root: TyVid
🔬 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 vid of the type variable that is in the process of being instantiated; if we find this within the type we are folding, that means we would have created a cyclic type.
ambient_variance: Variance
🔬 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?
Track the variance as we descend into the type.
needs_wf: bool
🔬 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?
See the field needs_wf in Generalization.
root_ty: 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?
The root type that we are generalizing. Used when reporting cycles.
Trait Implementations
impl<'cx, 'gcx, 'tcx> TypeRelation<'cx, 'gcx, 'tcx> for Generalizer<'cx, 'gcx, 'tcx>[src]
impl<'cx, 'gcx, 'tcx> TypeRelation<'cx, 'gcx, 'tcx> for Generalizer<'cx, 'gcx, 'tcx>fn tcx(&self) -> TyCtxt<'cx, 'gcx, 'tcx>[src]
fn tcx(&self) -> 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?
fn tag(&self) -> &'static str[src]
fn tag(&self) -> &'static str🔬 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?
Returns a static string we can use for printouts.
fn a_is_expected(&self) -> bool[src]
fn a_is_expected(&self) -> bool🔬 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?
Returns true if the value a is the "expected" type in the relation. Just affects error messages. Read more
fn binders<T>(
&mut self,
a: &Binder<T>,
b: &Binder<T>
) -> RelateResult<'tcx, Binder<T>> where
T: Relate<'tcx>, [src]
fn binders<T>(
&mut self,
a: &Binder<T>,
b: &Binder<T>
) -> RelateResult<'tcx, Binder<T>> where
T: Relate<'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 relate_item_substs(
&mut self,
item_def_id: DefId,
a_subst: &'tcx Substs<'tcx>,
b_subst: &'tcx Substs<'tcx>
) -> RelateResult<'tcx, &'tcx Substs<'tcx>>[src]
fn relate_item_substs(
&mut self,
item_def_id: DefId,
a_subst: &'tcx Substs<'tcx>,
b_subst: &'tcx Substs<'tcx>
) -> RelateResult<'tcx, &'tcx Substs<'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?
Relate the two substitutions for the given item. The default is to look up the variance for the item and proceed accordingly. Read more
fn relate_with_variance<T: Relate<'tcx>>(
&mut self,
variance: Variance,
a: &T,
b: &T
) -> RelateResult<'tcx, T>[src]
fn relate_with_variance<T: Relate<'tcx>>(
&mut self,
variance: Variance,
a: &T,
b: &T
) -> RelateResult<'tcx, T>🔬 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?
Switch variance for the purpose of relating a and b.
fn tys(&mut self, t: Ty<'tcx>, t2: Ty<'tcx>) -> RelateResult<'tcx, Ty<'tcx>>[src]
fn tys(&mut self, t: Ty<'tcx>, t2: Ty<'tcx>) -> RelateResult<'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 regions(
&mut self,
r: Region<'tcx>,
r2: Region<'tcx>
) -> RelateResult<'tcx, Region<'tcx>>[src]
fn regions(
&mut self,
r: Region<'tcx>,
r2: Region<'tcx>
) -> RelateResult<'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 with_cause<F, R>(&mut self, _cause: Cause, f: F) -> R where
F: FnOnce(&mut Self) -> R, [src]
fn with_cause<F, R>(&mut self, _cause: Cause, f: F) -> R where
F: FnOnce(&mut Self) -> R, 🔬 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 relate<T: Relate<'tcx>>(&mut self, a: &T, b: &T) -> RelateResult<'tcx, T>[src]
fn relate<T: Relate<'tcx>>(&mut self, a: &T, b: &T) -> RelateResult<'tcx, T>🔬 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?
Generic relation routine suitable for most anything.
Auto Trait Implementations
impl<'cx, 'gcx, 'tcx> !Send for Generalizer<'cx, 'gcx, 'tcx>
impl<'cx, 'gcx, 'tcx> !Send for Generalizer<'cx, 'gcx, 'tcx>impl<'cx, 'gcx, 'tcx> !Sync for Generalizer<'cx, 'gcx, 'tcx>
impl<'cx, 'gcx, 'tcx> !Sync for Generalizer<'cx, 'gcx, 'tcx>