[−][src]Enum rustc_trait_selection::infer::SubregionOrigin

pub enum SubregionOrigin<'tcx> {
    Subtype(Box<TypeTrace<'tcx>, Global>),
    RelateObjectBound(Span),
    RelateParamBound(Span, &'tcx TyS<'tcx>),
    RelateRegionParamBound(Span),
    Reborrow(Span),
    ReborrowUpvar(Span, UpvarId),
    DataBorrowed(&'tcx TyS<'tcx>, Span),
    ReferenceOutlivesReferent(&'tcx TyS<'tcx>, Span),
    CallReturn(Span),
    CompareImplMethodObligation {
        span: Span,
        item_name: Symbol,
        impl_item_def_id: DefId,
        trait_item_def_id: DefId,
    },
}

The origin of a r1 <= r2 constraint.

See error_reporting module for more details

Variants

Subtype(Box<TypeTrace<'tcx>, Global>)

Arose from a subtyping relation

RelateObjectBound(Span)

When casting &'a T to an &'b Trait object, relating 'a to 'b

RelateParamBound(Span, &'tcx TyS<'tcx>)

Some type parameter was instantiated with the given type, and that type must outlive some region.

RelateRegionParamBound(Span)

The given region parameter was instantiated with a region that must outlive some other region.

Reborrow(Span)

Creating a pointer b to contents of another reference

ReborrowUpvar(Span, UpvarId)

Creating a pointer b to contents of an upvar

DataBorrowed(&'tcx TyS<'tcx>, Span)

Data with type Ty<'tcx> was borrowed

ReferenceOutlivesReferent(&'tcx TyS<'tcx>, Span)

(&'a &'b T) where a >= b

CallReturn(Span)

Region in return type of invoked fn must enclose call

CompareImplMethodObligation

Comparing the signature and requirements of an impl method against the containing trait.

Fields of CompareImplMethodObligation

span: Spanitem_name: Symbolimpl_item_def_id: DefIdtrait_item_def_id: DefId

Auto Trait Implementations

impl<'tcx> !RefUnwindSafe for SubregionOrigin<'tcx>

impl<'tcx> !Send for SubregionOrigin<'tcx>

impl<'tcx> !Sync for SubregionOrigin<'tcx>

impl<'tcx> Unpin for SubregionOrigin<'tcx>

impl<'tcx> !UnwindSafe for SubregionOrigin<'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<T> From<T> for T[src]

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

impl<T> ToOwned for T where
    T: Clone, 
[src]

type Owned = T

The resulting type after obtaining ownership.

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]