Struct rustc::middle::typeck::infer::combine::CombineFields[src]
pub struct CombineFields<'a> {
pub infcx: &'a InferCtxt<'a>,
pub a_is_expected: bool,
pub trace: TypeTrace,
}Fields
infcx | |
a_is_expected | |
trace |
Trait Implementations
impl<'f, T: LatticeValue, K: UnifyKey<Bounds<T>>> CombineFieldsLatticeMethods<T, K> for CombineFields<'f>
fn var_sub_var(&self, a_id: K, b_id: K) -> ures
Make one variable a subtype of another variable. This is a subtle and tricky process, as described in detail at the top of infer.rs.
fn var_sub_t(&self, a_id: K, b: T) -> ures
make variable a subtype of T
Make a variable (a_id) a subtype of the concrete type b.
fn t_sub_var(&self, a: T, b_id: K) -> ures
Make a concrete type (a) a subtype of the variable b_id
fn set_var_to_merged_bounds(&self, v_id: K, a: &Bounds<T>, b: &Bounds<T>, rank: uint) -> ures
Updates the bounds for the variable v_id to be the intersection
of a and b. That is, the new bounds for v_id will be
a bounds c such that:
c.ub <: a.ub
c.ub <: b.ub
a.lb <: c.lb
b.lb <: c.lb
If this cannot be achieved, the result is failure.
impl<'f, T: LatticeValue> CombineFieldsLatticeMethods2<T> for CombineFields<'f>
fn merge_bnd(&self, a: &Bound<T>, b: &Bound<T>, lattice_op: LatticeOp<T>) -> cres<Bound<T>>
Combines two bounds into a more general bound.