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

pub enum SubregionOrigin<'tcx> {
    Subtype(Box<TypeTrace<'tcx>>),
    RelateObjectBound(Span),
    RelateParamBound(Span, Ty<'tcx>, Option<Span>),
    RelateRegionParamBound(Span),
    Reborrow(Span),
    ReborrowUpvar(Span, UpvarId),
    DataBorrowed(Ty<'tcx>, Span),
    ReferenceOutlivesReferent(Ty<'tcx>, Span),
    CallReturn(Span),
    CompareImplMethodObligation {
        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

Arose from a subtyping relation

Tuple Fields of Subtype

0: Box<TypeTrace<'tcx>>
RelateObjectBound

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

Tuple Fields of RelateObjectBound

0: Span
RelateParamBound

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

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

Tuple Fields of RelateRegionParamBound

0: Span
Reborrow

Creating a pointer b to contents of another reference

Tuple Fields of Reborrow

0: Span
ReborrowUpvar

Creating a pointer b to contents of an upvar

Tuple Fields of ReborrowUpvar

0: Span1: UpvarId
DataBorrowed

Data with type Ty<'tcx> was borrowed

Tuple Fields of DataBorrowed

0: Ty<'tcx>1: Span
ReferenceOutlivesReferent

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

Tuple Fields of ReferenceOutlivesReferent

0: Ty<'tcx>1: Span
CallReturn

Region in return type of invoked fn must enclose call

Tuple Fields of CallReturn

0: 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

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 be different between compiler versions and platforms. 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