Struct rustc_middle::traits::InternedObligationCauseCode
source · pub struct InternedObligationCauseCode<'tcx> {
code: Option<Lrc<ObligationCauseCode<'tcx>>>,
}
Fields§
§code: Option<Lrc<ObligationCauseCode<'tcx>>>
None
for ObligationCauseCode::MiscObligation
(a common case, occurs ~60% of
the time). Some
otherwise.
Methods from Deref<Target = ObligationCauseCode<'tcx>>§
sourcepub fn peel_derives(&self) -> &Self
pub fn peel_derives(&self) -> &Self
Returns the base obligation, ignoring derived obligations.
pub fn parent(&self) -> Option<(&Self, Option<PolyTraitPredicate<'tcx>>)>
pub fn peel_match_impls(&self) -> &Self
Trait Implementations§
source§impl<'tcx> Clone for InternedObligationCauseCode<'tcx>
impl<'tcx> Clone for InternedObligationCauseCode<'tcx>
source§fn clone(&self) -> InternedObligationCauseCode<'tcx>
fn clone(&self) -> InternedObligationCauseCode<'tcx>
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl<'tcx> Debug for InternedObligationCauseCode<'tcx>
impl<'tcx> Debug for InternedObligationCauseCode<'tcx>
source§impl<'tcx> Default for InternedObligationCauseCode<'tcx>
impl<'tcx> Default for InternedObligationCauseCode<'tcx>
source§fn default() -> InternedObligationCauseCode<'tcx>
fn default() -> InternedObligationCauseCode<'tcx>
Returns the “default value” for a type. Read more
source§impl<'tcx> Deref for InternedObligationCauseCode<'tcx>
impl<'tcx> Deref for InternedObligationCauseCode<'tcx>
source§impl<'tcx> Hash for InternedObligationCauseCode<'tcx>
impl<'tcx> Hash for InternedObligationCauseCode<'tcx>
source§impl<'tcx, '__lifted> Lift<'__lifted> for InternedObligationCauseCode<'tcx>
impl<'tcx, '__lifted> Lift<'__lifted> for InternedObligationCauseCode<'tcx>
type Lifted = InternedObligationCauseCode<'__lifted>
fn lift_to_tcx(
self,
__tcx: TyCtxt<'__lifted>
) -> Option<InternedObligationCauseCode<'__lifted>>
source§impl<'tcx> PartialEq<InternedObligationCauseCode<'tcx>> for InternedObligationCauseCode<'tcx>
impl<'tcx> PartialEq<InternedObligationCauseCode<'tcx>> for InternedObligationCauseCode<'tcx>
source§fn eq(&self, other: &InternedObligationCauseCode<'tcx>) -> bool
fn eq(&self, other: &InternedObligationCauseCode<'tcx>) -> bool
impl<'tcx> Eq for InternedObligationCauseCode<'tcx>
impl<'tcx> StructuralEq for InternedObligationCauseCode<'tcx>
impl<'tcx> StructuralPartialEq for InternedObligationCauseCode<'tcx>
Auto Trait Implementations§
impl<'tcx> !RefUnwindSafe for InternedObligationCauseCode<'tcx>
impl<'tcx> !Send for InternedObligationCauseCode<'tcx>
impl<'tcx> !Sync for InternedObligationCauseCode<'tcx>
impl<'tcx> Unpin for InternedObligationCauseCode<'tcx>
impl<'tcx> !UnwindSafe for InternedObligationCauseCode<'tcx>
Blanket Implementations§
source§impl<T, R> InternIteratorElement<T, R> for T
impl<T, R> InternIteratorElement<T, R> for T
type Output = R
fn intern_with<I, F>(iter: I, f: F) -> <T as InternIteratorElement<T, R>>::Outputwhere
I: Iterator<Item = T>,
F: FnOnce(&[T]) -> R,
source§impl<T> MaybeResult<T> for T
impl<T> MaybeResult<T> for T
source§impl<'tcx, T> ToPredicate<'tcx, T> for T
impl<'tcx, T> ToPredicate<'tcx, T> for T
fn to_predicate(self, _tcx: TyCtxt<'tcx>) -> T
source§impl<Tcx, T> Value<Tcx> for Twhere
Tcx: DepContext,
impl<Tcx, T> Value<Tcx> for Twhere
Tcx: DepContext,
default fn from_cycle_error(tcx: Tcx, _: &[QueryInfo]) -> 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: 8 bytes