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

🔬 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?

🔬 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?

🔬 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?

🔬 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?

🔬 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]

🔬 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?

🔬 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?

🔬 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?

🔬 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?

🔬 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?

🔬 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.

🔬 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]

🔬 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?

🔬 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.

🔬 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?

🔬 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]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Auto Trait Implementations

impl<'infcx, 'gcx, 'tcx> !Send for CombineFields<'infcx, 'gcx, 'tcx>

impl<'infcx, 'gcx, 'tcx> !Sync for CombineFields<'infcx, 'gcx, 'tcx>