Struct rustc::middle::traits::ObligationExperimental [-]  [+] [src]

pub struct Obligation {
    pub cause: ObligationCause,
    pub recursion_depth: uint,
    pub trait_ref: Rc<TraitRef>,
}

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
recursion_depth
trait_ref

Methods

impl Obligation

fn new(cause: ObligationCause, trait_ref: Rc<TraitRef>) -> Obligation

fn misc(span: Span, trait_ref: Rc<TraitRef>) -> Obligation

fn self_ty(&self) -> t

Trait Implementations

impl Repr for Obligation

fn repr(&self, tcx: &ctxt) -> String

impl TypeFoldable for Obligation

fn fold_with<'tcx, F: TypeFolder<'tcx>>(&self, folder: &mut F) -> Obligation

Derived Implementations

impl Clone for Obligation

fn clone(&self) -> Obligation

fn clone_from(&mut self, source: &Self)