1
Fork 0

Update parser with for syntax

This commit is contained in:
Niko Matsakis 2014-11-07 06:53:45 -05:00
parent c18a1327e3
commit 244231720d
28 changed files with 543 additions and 404 deletions

View file

@ -963,6 +963,12 @@ impl Clean<Type> for ast::TraitRef {
}
}
impl Clean<Type> for ast::PolyTraitRef {
fn clean(&self, cx: &DocContext) -> Type {
self.trait_ref.clean(cx)
}
}
#[deriving(Clone, Encodable, Decodable)]
pub enum TraitMethod {
RequiredMethod(Item),
@ -1306,7 +1312,8 @@ impl Clean<Type> for ty::t {
}
ty::ty_struct(did, ref substs) |
ty::ty_enum(did, ref substs) |
ty::ty_trait(box ty::TyTrait { def_id: did, ref substs, .. }) => {
ty::ty_trait(box ty::TyTrait { principal: ty::TraitRef { def_id: did, ref substs },
.. }) => {
let fqn = csearch::get_item_path(cx.tcx(), did);
let fqn: Vec<String> = fqn.into_iter().map(|i| {
i.to_string()