pub enum SubregionOrigin<'tcx> {
Subtype(Box<TypeTrace<'tcx>, Global>),
RelateObjectBound(Span),
RelateParamBound(Span, Ty<'tcx>, Option<Span>),
RelateRegionParamBound(Span),
Reborrow(Span),
ReferenceOutlivesReferent(Ty<'tcx>, Span),
CompareImplItemObligation {
span: Span,
impl_item_def_id: LocalDefId,
trait_item_def_id: DefId,
},
CheckAssociatedTypeBounds {
parent: Box<SubregionOrigin<'tcx>, Global>,
impl_item_def_id: LocalDefId,
trait_item_def_id: DefId,
},
AscribeUserTypeProvePredicate(Span),
}
Expand description
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, Ty<'tcx>, Option<Span>)
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.
ReferenceOutlivesReferent(Ty<'tcx>, Span)
(&’a &’b T) where a >= b
CompareImplItemObligation
Comparing the signature and requirements of an impl method against the containing trait.
CheckAssociatedTypeBounds
Checking that the bounds of a trait’s associated type hold for a given impl.
AscribeUserTypeProvePredicate(Span)
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§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
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:
Subtype
: 12 bytesRelateObjectBound
: 8 bytesRelateParamBound
: 28 bytesRelateRegionParamBound
: 8 bytesReborrow
: 8 bytesReferenceOutlivesReferent
: 20 bytesCompareImplItemObligation
: 20 bytesCheckAssociatedTypeBounds
: 20 bytesAscribeUserTypeProvePredicate
: 8 bytes