Struct rustc::middle::traits::SelectionContextUnstable
[-] [+]
[src]
pub struct SelectionContext<'cx, 'tcx> { // some fields omitted }
Methods
impl<'cx, 'tcx> SelectionContext<'cx, 'tcx>
fn new(infcx: &'cx InferCtxt<'cx, 'tcx>, closure_typer: &'cx ClosureTyper<'tcx>) -> SelectionContext<'cx, 'tcx>
fn intercrate(infcx: &'cx InferCtxt<'cx, 'tcx>, closure_typer: &'cx ClosureTyper<'tcx>) -> SelectionContext<'cx, 'tcx>
fn infcx(&self) -> &'cx InferCtxt<'cx, 'tcx>
fn tcx(&self) -> &'cx ctxt<'tcx>
fn param_env(&self) -> &'cx ParameterEnvironment<'cx, 'tcx>
fn closure_typer(&self) -> &'cx ClosureTyper<'tcx> + 'cx
fn select(&mut self, obligation: &TraitObligation<'tcx>) -> SelectionResult<'tcx, Selection<'tcx>>
Attempts to satisfy the obligation. If successful, this will affect the surrounding type environment by performing unification.
fn evaluate_obligation(&mut self, obligation: &PredicateObligation<'tcx>) -> bool
Evaluates whether the obligation obligation
can be satisfied (by any means).
fn evaluate_impl(&mut self, impl_def_id: DefId, obligation: &TraitObligation<'tcx>) -> bool
Evaluates whether the impl with id impl_def_id
could be applied to the self type
obligation_self_ty
. This can be used either for trait or inherent impls.