Function rustc_trans::middle::traits::supertraitsExperimental
[-]
[+]
[src]
pub fn supertraits(tcx: &'cx ctxt<'tcx>, trait_ref: Rc<TraitRef<'tcx>>) -> Supertraits<'cx, 'tcx>
Returns an iterator over the trait reference T and all of its
supertrait references. May contain duplicates. In general
the ordering is not defined.
Example:
trait Foo { ... } trait Bar : Foo { ... } trait Baz : Bar+Foo { ... }
supertraits(Baz) yields [Baz, Bar, Foo, Foo] in some order.