Struct rustc_trans::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: CodeExtent, cache: Option<&'cx mut HashSet<&'tcx TyS<'tcx>, RandomSipHasher>>) -> BoundsChecker<'cx, 'tcx>
fn check_trait_ref(&mut self, trait_ref: &TraitRef<'tcx>)
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).