Struct rustc::traits::Obligation
[−]
[src]
pub struct Obligation<'tcx, T> { pub cause: ObligationCause<'tcx>, pub param_env: ParamEnv<'tcx>, pub predicate: T, pub recursion_depth: usize, }
🔬 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?
An Obligation
represents some trait reference (e.g. int:Eq
) for
which the vtable must be found. The process of finding a vtable is
called "resolving" the Obligation
. This process consists of
either identifying an impl
(e.g., impl Eq for int
) that
provides the required vtable, or else finding a bound that is in
scope. The eventual result is usually a Selection
(defined below).
Fields
cause: 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?
Why do we have to prove this thing?
param_env: ParamEnv<'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?
In which environment should we prove this thing?
predicate: T
🔬 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?
What are we trying to prove?
recursion_depth: usize
🔬 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?
If we started proving this as a result of trying to prove something else, track the total depth to ensure termination. If this goes over a certain threshold, we abort compilation -- in such cases, we can not say whether or not the predicate holds for certain. Stupid halting problem. Such a drag.
Methods
impl<'tcx, O> Obligation<'tcx, O>
[src]
impl<'tcx, O> Obligation<'tcx, O>
pub fn new(
cause: ObligationCause<'tcx>,
param_env: ParamEnv<'tcx>,
predicate: O
) -> Obligation<'tcx, O>
[src]
pub fn new(
cause: ObligationCause<'tcx>,
param_env: ParamEnv<'tcx>,
predicate: O
) -> Obligation<'tcx, O>
🔬 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,
param_env: ParamEnv<'tcx>,
trait_ref: O
) -> Obligation<'tcx, O>
[src]
pub fn misc(
span: Span,
body_id: NodeId,
param_env: ParamEnv<'tcx>,
trait_ref: O
) -> Obligation<'tcx, O>
🔬 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 with<P>(&self, value: P) -> Obligation<'tcx, P>
[src]
pub fn with<P>(&self, value: P) -> Obligation<'tcx, P>
🔬 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<'tcx, O: Debug> Debug for Obligation<'tcx, O>
[src]
impl<'tcx, O: Debug> Debug for Obligation<'tcx, O>
fn fmt(&self, f: &mut Formatter) -> Result
[src]
fn fmt(&self, f: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl<'tcx, O: TypeFoldable<'tcx>> TypeFoldable<'tcx> for Obligation<'tcx, O>
[src]
impl<'tcx, O: TypeFoldable<'tcx>> TypeFoldable<'tcx> for Obligation<'tcx, O>
fn super_fold_with<'gcx: 'tcx, F: TypeFolder<'gcx, 'tcx>>(
&self,
folder: &mut F
) -> Self
[src]
fn super_fold_with<'gcx: 'tcx, F: TypeFolder<'gcx, 'tcx>>(
&self,
folder: &mut F
) -> Self
🔬 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 super_visit_with<V: TypeVisitor<'tcx>>(&self, visitor: &mut V) -> bool
[src]
fn super_visit_with<V: TypeVisitor<'tcx>>(&self, visitor: &mut V) -> bool
🔬 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 fold_with<'gcx: 'tcx, F: TypeFolder<'gcx, 'tcx>>(
&self,
folder: &mut F
) -> Self
[src]
fn fold_with<'gcx: 'tcx, F: TypeFolder<'gcx, 'tcx>>(
&self,
folder: &mut F
) -> Self
🔬 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 visit_with<V: TypeVisitor<'tcx>>(&self, visitor: &mut V) -> bool
[src]
fn visit_with<V: TypeVisitor<'tcx>>(&self, visitor: &mut V) -> bool
🔬 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 has_regions_escaping_depth(&self, depth: u32) -> bool
[src]
fn has_regions_escaping_depth(&self, depth: u32) -> bool
🔬 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 has_escaping_regions(&self) -> bool
[src]
fn has_escaping_regions(&self) -> bool
🔬 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 has_type_flags(&self, flags: TypeFlags) -> bool
[src]
fn has_type_flags(&self, flags: TypeFlags) -> bool
🔬 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 has_projections(&self) -> bool
[src]
fn has_projections(&self) -> bool
🔬 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 references_error(&self) -> bool
[src]
fn references_error(&self) -> bool
🔬 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 has_param_types(&self) -> bool
[src]
fn has_param_types(&self) -> bool
🔬 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 has_self_ty(&self) -> bool
[src]
fn has_self_ty(&self) -> bool
🔬 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 has_infer_types(&self) -> bool
[src]
fn has_infer_types(&self) -> bool
🔬 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 needs_infer(&self) -> bool
[src]
fn needs_infer(&self) -> bool
🔬 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 needs_subst(&self) -> bool
[src]
fn needs_subst(&self) -> bool
🔬 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 has_re_skol(&self) -> bool
[src]
fn has_re_skol(&self) -> bool
🔬 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 has_closure_types(&self) -> bool
[src]
fn has_closure_types(&self) -> bool
🔬 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 has_free_regions(&self) -> bool
[src]
fn has_free_regions(&self) -> bool
🔬 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?
"Free" regions in this context means that it has any region that is not (a) erased or (b) late-bound. Read more
fn has_erasable_regions(&self) -> bool
[src]
fn has_erasable_regions(&self) -> bool
🔬 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?
True if there any any un-erased free regions.
fn is_normalized_for_trans(&self) -> bool
[src]
fn is_normalized_for_trans(&self) -> bool
🔬 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 is_global(&self) -> bool
[src]
fn is_global(&self) -> bool
🔬 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?
Indicates whether this value references only 'global' types/lifetimes that are the same regardless of what fn we are in. This is used for caching. Errs on the side of returning false. Read more
impl<'tcx, T: Clone> Clone for Obligation<'tcx, T>
[src]
impl<'tcx, T: Clone> Clone for Obligation<'tcx, T>
fn clone(&self) -> Obligation<'tcx, T>
[src]
fn clone(&self) -> Obligation<'tcx, T>
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, T: PartialEq> PartialEq for Obligation<'tcx, T>
[src]
impl<'tcx, T: PartialEq> PartialEq for Obligation<'tcx, T>
fn eq(&self, __arg_0: &Obligation<'tcx, T>) -> bool
[src]
fn eq(&self, __arg_0: &Obligation<'tcx, T>) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &Obligation<'tcx, T>) -> bool
[src]
fn ne(&self, __arg_0: &Obligation<'tcx, T>) -> bool
This method tests for !=
.
impl<'tcx, T: Eq> Eq for Obligation<'tcx, T>
[src]
impl<'tcx, T: Eq> Eq for Obligation<'tcx, T>
impl<'tcx, T: Hash> Hash for Obligation<'tcx, T>
[src]
impl<'tcx, T: Hash> Hash for Obligation<'tcx, T>
Auto Trait Implementations
impl<'tcx, T> !Send for Obligation<'tcx, T>
impl<'tcx, T> !Send for Obligation<'tcx, T>
impl<'tcx, T> !Sync for Obligation<'tcx, T>
impl<'tcx, T> !Sync for Obligation<'tcx, T>