Struct rustc::middle::typeck::check::wf::BoundsCheckerExperimental [-]  [+] [src]

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

Methods

impl<'cx, 'tcx> BoundsChecker<'cx, 'tcx>

fn new(fcx: &'cx FnCtxt<'cx, 'tcx>, span: Span, scope_id: NodeId, cache: Option<&'cx mut HashSet<t>>) -> BoundsChecker<'cx, 'tcx>

fn check_trait_ref(&mut self, trait_ref: &TraitRef)

Given a trait ref like A : Trait<B>, where Trait is defined as (say):

trait Trait<B:OtherTrait> : Copy { ... }

This routine will check that B : OtherTrait and A : Trait<B>. It will also recursively check that the types A and B are well-formed.

Note that it does not (currently, at least) check that A : Copy (that check is delegated to the point where impl A : Trait<B> is implemented).

fn check_ty(&mut self, ty: t)

Trait Implementations

impl<'cx, 'tcx> TypeFolder<'tcx> for BoundsChecker<'cx, 'tcx>

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

fn fold_ty(&mut self, t: t) -> t

fn fold_mt(&mut self, t: &mt) -> mt

fn fold_trait_ref(&mut self, t: &TraitRef) -> TraitRef

fn fold_sty(&mut self, sty: &sty) -> sty

fn fold_substs(&mut self, substs: &Substs) -> Substs

fn fold_sig(&mut self, sig: &FnSig) -> FnSig

fn fold_output(&mut self, output: &FnOutput) -> FnOutput

fn fold_bare_fn_ty(&mut self, fty: &BareFnTy) -> BareFnTy

fn fold_closure_ty(&mut self, fty: &ClosureTy) -> ClosureTy

fn fold_region(&mut self, r: Region) -> Region

fn fold_trait_store(&mut self, s: TraitStore) -> TraitStore

fn fold_existential_bounds(&mut self, s: ExistentialBounds) -> ExistentialBounds

fn fold_autoref(&mut self, ar: &AutoRef) -> AutoRef

fn fold_item_substs(&mut self, i: ItemSubsts) -> ItemSubsts

fn fold_obligation(&mut self, o: &Obligation) -> Obligation