Struct rustc_trans::middle::traits::SelectionContextUnstable
[-] [+]
[src]
pub struct SelectionContext<'cx, 'tcx> where 'tcx: 'cx {
// some fields omitted
}
Methods
impl<'cx, 'tcx> SelectionContext<'cx, 'tcx>
fn new(infcx: &'cx InferCtxt<'cx, 'tcx>, closure_typer: &'cx ClosureTyper<'tcx> + 'cx) -> SelectionContext<'cx, 'tcx>
fn intercrate(infcx: &'cx InferCtxt<'cx, 'tcx>, closure_typer: &'cx ClosureTyper<'tcx> + 'cx) -> 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: &Obligation<'tcx, Binder<TraitPredicate<'tcx>>>) -> Result<Option<Vtable<'tcx, Obligation<'tcx, Predicate<'tcx>>>>, SelectionError<'tcx>>
Attempts to satisfy the obligation. If successful, this will affect the surrounding type environment by performing unification.
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.