Struct rustc_typeck::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: &Obligation<'tcx, Binder<TraitPredicate<'tcx>>>) -> Result<Option<Vtable<'tcx, Obligation<'tcx, Predicate<'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 evaluate_obligation(&mut self, obligation: &Obligation<'tcx, Predicate<'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, Binder<TraitPredicate<'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.