Struct rustc::traits::ObligationCause [−][src]
pub struct ObligationCause<'tcx> {
pub span: Span,
pub body_id: NodeId,
pub code: ObligationCauseCode<'tcx>,
}🔬 This is a nightly-only experimental API. (rustc_private)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml instead?
Why did we incur this obligation? Used for error reporting.
Fields
span: Span
🔬 This is a nightly-only experimental API. (rustc_private)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml instead?
body_id: NodeId
🔬 This is a nightly-only experimental API. (rustc_private)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml instead?
code: ObligationCauseCode<'tcx>
🔬 This is a nightly-only experimental API. (rustc_private)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml instead?
Methods
impl<'tcx> ObligationCause<'tcx>[src]
impl<'tcx> ObligationCause<'tcx>fn as_failure_code(&self, terr: &TypeError<'tcx>) -> FailureCode[src]
fn as_failure_code(&self, terr: &TypeError<'tcx>) -> FailureCode🔬 This is a nightly-only experimental API. (rustc_private)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml instead?
fn as_requirement_str(&self) -> &'static str[src]
fn as_requirement_str(&self) -> &'static str🔬 This is a nightly-only experimental API. (rustc_private)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml instead?
impl<'tcx> ObligationCause<'tcx>[src]
impl<'tcx> ObligationCause<'tcx>pub fn span<'a, 'gcx>(&self, tcx: &TyCtxt<'a, 'gcx, 'tcx>) -> Span[src]
pub fn span<'a, 'gcx>(&self, tcx: &TyCtxt<'a, 'gcx, 'tcx>) -> Span🔬 This is a nightly-only experimental API. (rustc_private)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml instead?
impl<'tcx> ObligationCause<'tcx>[src]
impl<'tcx> ObligationCause<'tcx>pub fn new(
span: Span,
body_id: NodeId,
code: ObligationCauseCode<'tcx>
) -> ObligationCause<'tcx>[src]
pub fn new(
span: Span,
body_id: NodeId,
code: ObligationCauseCode<'tcx>
) -> ObligationCause<'tcx>🔬 This is a nightly-only experimental API. (rustc_private)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml instead?
pub fn misc(span: Span, body_id: NodeId) -> ObligationCause<'tcx>[src]
pub fn misc(span: Span, body_id: NodeId) -> ObligationCause<'tcx>🔬 This is a nightly-only experimental API. (rustc_private)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml instead?
pub fn dummy() -> ObligationCause<'tcx>[src]
pub fn dummy() -> ObligationCause<'tcx>🔬 This is a nightly-only experimental API. (rustc_private)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml instead?
Trait Implementations
impl<'a, 'tcx> Lift<'tcx> for ObligationCause<'a>[src]
impl<'a, 'tcx> Lift<'tcx> for ObligationCause<'a>type Lifted = ObligationCause<'tcx>
🔬 This is a nightly-only experimental API. (rustc_private)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml instead?
fn lift_to_tcx<'b, 'gcx>(
&self,
tcx: TyCtxt<'b, 'gcx, 'tcx>
) -> Option<Self::Lifted>[src]
fn lift_to_tcx<'b, 'gcx>(
&self,
tcx: TyCtxt<'b, 'gcx, 'tcx>
) -> Option<Self::Lifted>🔬 This is a nightly-only experimental API. (rustc_private)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml instead?
impl<'tcx> Clone for ObligationCause<'tcx>[src]
impl<'tcx> Clone for ObligationCause<'tcx>fn clone(&self) -> ObligationCause<'tcx>[src]
fn clone(&self) -> ObligationCause<'tcx>Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)1.0.0[src]
fn clone_from(&mut self, source: &Self)Performs copy-assignment from source. Read more
impl<'tcx> Debug for ObligationCause<'tcx>[src]
impl<'tcx> Debug for ObligationCause<'tcx>fn fmt(&self, f: &mut Formatter) -> Result[src]
fn fmt(&self, f: &mut Formatter) -> ResultFormats the value using the given formatter. Read more
impl<'tcx> PartialEq for ObligationCause<'tcx>[src]
impl<'tcx> PartialEq for ObligationCause<'tcx>fn eq(&self, other: &ObligationCause<'tcx>) -> bool[src]
fn eq(&self, other: &ObligationCause<'tcx>) -> boolThis method tests for self and other values to be equal, and is used by ==. Read more
fn ne(&self, other: &ObligationCause<'tcx>) -> bool[src]
fn ne(&self, other: &ObligationCause<'tcx>) -> boolThis method tests for !=.
impl<'tcx> Eq for ObligationCause<'tcx>[src]
impl<'tcx> Eq for ObligationCause<'tcx>fn assert_receiver_is_total_eq(&self)[src]
fn assert_receiver_is_total_eq(&self)impl<'tcx> Hash for ObligationCause<'tcx>[src]
impl<'tcx> Hash for ObligationCause<'tcx>Auto Trait Implementations
impl<'tcx> !Send for ObligationCause<'tcx>
impl<'tcx> !Send for ObligationCause<'tcx>impl<'tcx> !Sync for ObligationCause<'tcx>
impl<'tcx> !Sync for ObligationCause<'tcx>