Enum rustc_infer::infer::SubregionOrigin[][src]

pub enum SubregionOrigin<'tcx> {
    Subtype(Box<TypeTrace<'tcx>>),
    RelateObjectBound(Span),
    RelateParamBound(SpanTy<'tcx>, Option<Span>),
    RelateRegionParamBound(Span),
    Reborrow(Span),
    ReborrowUpvar(SpanUpvarId),
    DataBorrowed(Ty<'tcx>, Span),
    ReferenceOutlivesReferent(Ty<'tcx>, Span),
    CompareImplMethodObligation {
        span: Span,
        item_name: Symbol,
        impl_item_def_id: DefId,
        trait_item_def_id: DefId,
    },
    CompareImplTypeObligation {
        span: Span,
        item_name: Symbol,
        impl_item_def_id: DefId,
        trait_item_def_id: DefId,
    },
}
Expand description

The origin of a r1 <= r2 constraint.

See error_reporting module for more details

Variants

Subtype(Box<TypeTrace<'tcx>>)

Arose from a subtyping relation

Tuple Fields of Subtype

0: Box<TypeTrace<'tcx>>
RelateObjectBound(Span)

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

Tuple Fields of RelateObjectBound

0: Span
RelateParamBound(SpanTy<'tcx>, Option<Span>)

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

Tuple Fields of RelateParamBound

0: Span1: Ty<'tcx>2: Option<Span>
RelateRegionParamBound(Span)

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

Tuple Fields of RelateRegionParamBound

0: Span
Reborrow(Span)

Creating a pointer b to contents of another reference

Tuple Fields of Reborrow

0: Span
ReborrowUpvar(SpanUpvarId)

Creating a pointer b to contents of an upvar

Tuple Fields of ReborrowUpvar

0: Span1: UpvarId
DataBorrowed(Ty<'tcx>, Span)

Data with type Ty<'tcx> was borrowed

Tuple Fields of DataBorrowed

0: Ty<'tcx>1: Span
ReferenceOutlivesReferent(Ty<'tcx>, Span)

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

Tuple Fields of ReferenceOutlivesReferent

0: Ty<'tcx>1: Span
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
CompareImplTypeObligation

Comparing the signature and requirements of an impl associated type against the containing trait

Fields of CompareImplTypeObligation

span: Spanitem_name: Symbolimpl_item_def_id: DefIdtrait_item_def_id: DefId

Implementations

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

Layout

Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...) attributes. Please see the Rust Reference’s “Type Layout” chapter for details on type layout guarantees.

Size: 32 bytes

Size for each variant: