Struct rustc::infer::combine::CombineFields [−][src]
pub struct CombineFields<'infcx, 'gcx: 'infcx + 'tcx, 'tcx: 'infcx> { pub infcx: &'infcx InferCtxt<'infcx, 'gcx, 'tcx>, pub trace: TypeTrace<'tcx>, pub cause: Option<Cause>, pub param_env: ParamEnv<'tcx>, pub obligations: PredicateObligations<'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: &'infcx InferCtxt<'infcx, '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?
trace: TypeTrace<'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?
cause: Option<Cause>
🔬 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?
param_env: ParamEnv<'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?
obligations: PredicateObligations<'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?
Methods
impl<'infcx, 'gcx, 'tcx> CombineFields<'infcx, 'gcx, 'tcx>
[src]
impl<'infcx, 'gcx, 'tcx> CombineFields<'infcx, 'gcx, 'tcx>
pub fn tcx(&self) -> TyCtxt<'infcx, 'gcx, 'tcx>
[src]
pub fn tcx(&self) -> TyCtxt<'infcx, '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?
pub fn equate<'a>(
&'a mut self,
a_is_expected: bool
) -> Equate<'a, 'infcx, 'gcx, 'tcx>
[src]
pub fn equate<'a>(
&'a mut self,
a_is_expected: bool
) -> Equate<'a, 'infcx, '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?
pub fn sub<'a>(&'a mut self, a_is_expected: bool) -> Sub<'a, 'infcx, 'gcx, 'tcx>
[src]
pub fn sub<'a>(&'a mut self, a_is_expected: bool) -> Sub<'a, 'infcx, '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?
pub fn lub<'a>(&'a mut self, a_is_expected: bool) -> Lub<'a, 'infcx, 'gcx, 'tcx>
[src]
pub fn lub<'a>(&'a mut self, a_is_expected: bool) -> Lub<'a, 'infcx, '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?
pub fn glb<'a>(&'a mut self, a_is_expected: bool) -> Glb<'a, 'infcx, 'gcx, 'tcx>
[src]
pub fn glb<'a>(&'a mut self, a_is_expected: bool) -> Glb<'a, 'infcx, '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?
pub fn instantiate(
&mut self,
a_ty: Ty<'tcx>,
dir: RelationDir,
b_vid: TyVid,
a_is_expected: bool
) -> RelateResult<'tcx, ()>
[src]
pub fn instantiate(
&mut self,
a_ty: Ty<'tcx>,
dir: RelationDir,
b_vid: TyVid,
a_is_expected: bool
) -> RelateResult<'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?
Here dir is either EqTo, SubtypeOf, or SupertypeOf. The
idea is that we should ensure that the type a_ty
is equal
to, a subtype of, or a supertype of (respectively) the type
to which b_vid
is bound.
Since b_vid
has not yet been instantiated with a type, we
will first instantiate b_vid
with a generalized version
of a_ty
. Generalization introduces other inference
variables wherever subtyping could occur.
fn generalize(
&self,
ty: Ty<'tcx>,
for_vid: TyVid,
dir: RelationDir
) -> RelateResult<'tcx, Generalization<'tcx>>
[src]
fn generalize(
&self,
ty: Ty<'tcx>,
for_vid: TyVid,
dir: RelationDir
) -> RelateResult<'tcx, Generalization<'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?
Attempts to generalize ty
for the type variable for_vid
.
This checks for cycle -- that is, whether the type ty
references for_vid
. The dir
is the "direction" for which we
a performing the generalization (i.e., are we producing a type
that can be used as a supertype etc).
Preconditions:
for_vid
is a "root vid"
impl<'a, 'gcx, 'tcx> CombineFields<'a, 'gcx, 'tcx>
[src]
impl<'a, 'gcx, 'tcx> CombineFields<'a, 'gcx, 'tcx>
pub fn higher_ranked_sub<T>(
&mut self,
a: &Binder<T>,
b: &Binder<T>,
a_is_expected: bool
) -> RelateResult<'tcx, Binder<T>> where
T: Relate<'tcx>,
[src]
pub fn higher_ranked_sub<T>(
&mut self,
a: &Binder<T>,
b: &Binder<T>,
a_is_expected: bool
) -> 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?
pub fn higher_ranked_match<T, U>(
&mut self,
a_pair: &Binder<(T, U)>,
b_match: &T,
a_is_expected: bool
) -> RelateResult<'tcx, HrMatchResult<U>> where
T: Relate<'tcx>,
U: TypeFoldable<'tcx>,
[src]
pub fn higher_ranked_match<T, U>(
&mut self,
a_pair: &Binder<(T, U)>,
b_match: &T,
a_is_expected: bool
) -> RelateResult<'tcx, HrMatchResult<U>> where
T: Relate<'tcx>,
U: 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?
The value consists of a pair (t, u)
where t
is the
matcher and u
is a value. The idea is to find a
substitution S
such that S(t) == b
, and then return
S(u)
. In other words, find values for the late-bound regions
in a
that can make t == b
and then replace the LBR in u
with those values.
This routine is (as of this writing) used in trait matching, particularly projection.
NB. It should not happen that there are LBR appearing in U
that do not appear in T
. If that happens, those regions are
unconstrained, and this routine replaces them with 'static
.
pub fn higher_ranked_lub<T>(
&mut self,
a: &Binder<T>,
b: &Binder<T>,
a_is_expected: bool
) -> RelateResult<'tcx, Binder<T>> where
T: Relate<'tcx>,
[src]
pub fn higher_ranked_lub<T>(
&mut self,
a: &Binder<T>,
b: &Binder<T>,
a_is_expected: bool
) -> 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?
pub fn higher_ranked_glb<T>(
&mut self,
a: &Binder<T>,
b: &Binder<T>,
a_is_expected: bool
) -> RelateResult<'tcx, Binder<T>> where
T: Relate<'tcx>,
[src]
pub fn higher_ranked_glb<T>(
&mut self,
a: &Binder<T>,
b: &Binder<T>,
a_is_expected: bool
) -> 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?
Trait Implementations
impl<'infcx, 'gcx: 'infcx + 'tcx, 'tcx: 'infcx> Clone for CombineFields<'infcx, 'gcx, 'tcx>
[src]
impl<'infcx, 'gcx: 'infcx + 'tcx, 'tcx: 'infcx> Clone for CombineFields<'infcx, 'gcx, 'tcx>
fn clone(&self) -> CombineFields<'infcx, 'gcx, 'tcx>
[src]
fn clone(&self) -> CombineFields<'infcx, 'gcx, 'tcx>
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
Auto Trait Implementations
impl<'infcx, 'gcx, 'tcx> !Send for CombineFields<'infcx, 'gcx, 'tcx>
impl<'infcx, 'gcx, 'tcx> !Send for CombineFields<'infcx, 'gcx, 'tcx>
impl<'infcx, 'gcx, 'tcx> !Sync for CombineFields<'infcx, 'gcx, 'tcx>
impl<'infcx, 'gcx, 'tcx> !Sync for CombineFields<'infcx, 'gcx, 'tcx>