[−][src]Struct rustc_infer::infer::sub::Sub

pub struct Sub<'combine, 'infcx, 'tcx> {
    fields: &'combine mut CombineFields<'infcx, 'tcx>,
    a_is_expected: bool,
}

Ensures a is made a subtype of b. Returns a on success.

Fields

fields: &'combine mut CombineFields<'infcx, 'tcx>a_is_expected: bool

Implementations

impl<'combine, 'infcx, 'tcx> Sub<'combine, 'infcx, 'tcx>[src]

pub fn new(
    f: &'combine mut CombineFields<'infcx, 'tcx>,
    a_is_expected: bool
) -> Sub<'combine, 'infcx, 'tcx>
[src]

pub(in infer::sub) fn with_expected_switched<R, F: FnOnce(&mut Self) -> R>(
    &mut self,
    f: F
) -> R
[src]

Trait Implementations

impl<'tcx, '_, '_> ConstEquateRelation<'tcx> for Sub<'_, '_, 'tcx>[src]

impl<'tcx, 'combine, 'infcx> TypeRelation<'tcx> for Sub<'combine, 'infcx, 'tcx>[src]

Auto Trait Implementations

impl<'combine, 'infcx, 'tcx> !RefUnwindSafe for Sub<'combine, 'infcx, 'tcx>

impl<'combine, 'infcx, 'tcx> !Send for Sub<'combine, 'infcx, 'tcx>

impl<'combine, 'infcx, 'tcx> !Sync for Sub<'combine, 'infcx, 'tcx>

impl<'combine, 'infcx, 'tcx> Unpin for Sub<'combine, 'infcx, 'tcx> where
    'infcx: 'combine,
    'tcx: 'combine, 

impl<'combine, 'infcx, 'tcx> !UnwindSafe for Sub<'combine, 'infcx, 'tcx>

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized, 
[src]

impl<T> Borrow<T> for T where
    T: ?Sized, 
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized, 
[src]

impl<'a, T> Captures<'a> for T where
    T: ?Sized, 
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> WithConstness for T[src]