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

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

Methods

impl 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 tcx(&self) -> &'cx ctxt<'tcx>

fn select(&mut self, obligation: &Obligation<'tcx>) -> Result<Option<Vtable<'tcx, Obligation<'tcx>>>, SelectionError<'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 select_inherent_impl(&mut self, impl_def_id: DefId, obligation_cause: ObligationCause<'tcx>, obligation_self_ty: &'tcx TyS<'tcx>) -> Result<Option<VtableImplData<'tcx, Obligation<'tcx>>>, SelectionError<'tcx>>

fn evaluate_obligation(&mut self, obligation: &Obligation<'tcx>) -> bool

Evaluates whether the obligation obligation can be satisfied (by any means).

fn evaluate_impl(&mut self, impl_def_id: DefId, obligation: &Obligation<'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.