[−][src]Struct rustc::infer::combine::CombineFields
🔬 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>
Blanket Implementations
impl<T> MaybeResult for T
[src]
impl<T> MaybeResult for T
fn from_ok(T) -> T
[src]
fn from_ok(T) -> 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?
fn map_same<F>(Self, F) -> T where
F: FnOnce(T) -> T,
[src]
fn map_same<F>(Self, F) -> T where
F: FnOnce(T) -> 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?
impl<'a, T> Captures for T where
T: ?Sized,
[src]
impl<'a, T> Captures for T where
T: ?Sized,
impl<T> ToOwned for T where
T: Clone,
[src]
impl<T> ToOwned for T where
T: Clone,
type Owned = T
fn to_owned(&self) -> T
[src]
fn to_owned(&self) -> T
Creates owned data from borrowed data, usually by cloning. Read more
fn clone_into(&self, target: &mut T)
[src]
fn clone_into(&self, target: &mut T)
🔬 This is a nightly-only experimental API. (toowned_clone_into
)
recently added
Uses borrowed data to replace owned data, usually by cloning. Read more
impl<T> From for T
[src]
impl<T> From for T
impl<T, U> Into for T where
U: From<T>,
[src]
impl<T, U> Into for T where
U: From<T>,
impl<T, U> TryFrom for T where
T: From<U>,
[src]
impl<T, U> TryFrom for T where
T: From<U>,
type Error = !
try_from
)The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
try_from
)Performs the conversion.
impl<T> Borrow for T where
T: ?Sized,
[src]
impl<T> Borrow for T where
T: ?Sized,
ⓘImportant traits for &'a mut Rfn borrow(&self) -> &T
[src]
fn borrow(&self) -> &T
Immutably borrows from an owned value. Read more
impl<T, U> TryInto for T where
U: TryFrom<T>,
[src]
impl<T, U> TryInto for T where
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
try_from
)The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
try_from
)Performs the conversion.
impl<T> BorrowMut for T where
T: ?Sized,
[src]
impl<T> BorrowMut for T where
T: ?Sized,
ⓘImportant traits for &'a mut Rfn borrow_mut(&mut self) -> &mut T
[src]
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<T> Any for T where
T: 'static + ?Sized,
[src]
impl<T> Any for T where
T: 'static + ?Sized,
fn get_type_id(&self) -> TypeId
[src]
fn get_type_id(&self) -> TypeId
🔬 This is a nightly-only experimental API. (get_type_id
)
this method will likely be replaced by an associated static
Gets the TypeId
of self
. Read more
impl<E> SpecializationError for E
[src]
impl<E> SpecializationError for E
fn not_found<S, T>(trait_name: &'static str, method_name: &'static str) -> E where
T: ?Sized,
[src]
fn not_found<S, T>(trait_name: &'static str, method_name: &'static str) -> E where
T: ?Sized,
🔬 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?
Create an error for a missing method specialization. Defaults to panicking with type, trait & method names. S
is the encoder/decoder state type, T
is the type being encoded/decoded, and the arguments are the names of the trait and method that should've been overridden. Read more
impl<T> Erased for T
[src]
impl<T> Erased for T
impl<T> Send for T where
T: ?Sized,
[src]
impl<T> Send for T where
T: ?Sized,
impl<T> Sync for T where
T: ?Sized,
[src]
impl<T> Sync for T where
T: ?Sized,
impl<T> Erased for T
impl<T> Erased for T