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

pub struct SelectionContext<'cx, 'tcx> {
    // some fields omitted
}

Methods

impl<'cx, 'tcx> SelectionContext<'cx, 'tcx>

fn new(infcx: &'cx InferCtxt<'cx, 'tcx>, param_env: &'cx ParameterEnvironment<'tcx>, typer: &'cx Typer<'tcx>) -> SelectionContext<'cx, 'tcx>

fn intercrate(infcx: &'cx InferCtxt<'cx, 'tcx>, param_env: &'cx ParameterEnvironment<'tcx>, typer: &'cx Typer<'tcx>) -> SelectionContext<'cx, 'tcx>

fn infcx(&self) -> &'cx InferCtxt<'cx, 'tcx>

fn param_env(&self) -> &'cx ParameterEnvironment<'tcx>

fn tcx(&self) -> &'cx ctxt<'tcx>

fn select(&mut self, obligation: &TraitObligation<'tcx>) -> SelectionResult<'tcx, Selection<'tcx>>

Evaluates whether the obligation can be satisfied. Returns an indication of whether the obligation can be satisfied and, if so, by what means. Never affects surrounding typing environment.

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.