Skip to content

Commit b768842

Browse files
committed
---
yaml --- r: 160653 b: refs/heads/master c: de94f0a h: refs/heads/master i: 160651: a1dc681 v: v3
1 parent 2690e3f commit b768842

File tree

3 files changed

+20
-1
lines changed

3 files changed

+20
-1
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
refs/heads/master: dd4c7c00d85a82d3ddda1b453ba2ce649a4d1b41
2+
refs/heads/master: de94f0affb6e8f700ce1e9c67a9572c9f262a5fa
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: c9f6d696420107f82304b992cf623b806995fe18
55
refs/heads/try: 225de0d60f8ca8dcc62ab2fd8818ebbda4b58cfe

trunk/src/librustdoc/clean/mod.rs

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1135,6 +1135,11 @@ pub enum Type {
11351135
mutability: Mutability,
11361136
type_: Box<Type>,
11371137
},
1138+
QPath {
1139+
name: String,
1140+
self_type: Box<Type>,
1141+
trait_: Box<Type>
1142+
},
11381143
// region, raw, other boxes, mutable
11391144
}
11401145

@@ -1260,6 +1265,7 @@ impl Clean<Type> for ast::Ty {
12601265
TyProc(ref c) => Proc(box c.clean(cx)),
12611266
TyBareFn(ref barefn) => BareFunction(box barefn.clean(cx)),
12621267
TyParen(ref ty) => ty.clean(cx),
1268+
TyQPath(ref qp) => qp.clean(cx),
12631269
ref x => panic!("Unimplemented type {}", x),
12641270
}
12651271
}
@@ -1362,6 +1368,16 @@ impl<'tcx> Clean<Type> for ty::Ty<'tcx> {
13621368
}
13631369
}
13641370

1371+
impl Clean<Type> for ast::QPath {
1372+
fn clean(&self, cx: &DocContext) -> Type {
1373+
Type::QPath {
1374+
name: self.item_name.clean(cx),
1375+
self_type: box self.self_type.clean(cx),
1376+
trait_: box self.trait_ref.clean(cx)
1377+
}
1378+
}
1379+
}
1380+
13651381
#[deriving(Clone, Encodable, Decodable)]
13661382
pub enum StructField {
13671383
HiddenStructField, // inserted later by strip passes

trunk/src/librustdoc/html/format.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -485,6 +485,9 @@ impl fmt::Show for clean::Type {
485485
}
486486
}
487487
}
488+
clean::QPath { ref name, ref self_type, ref trait_ } => {
489+
write!(f, "&lt;{} as {}&gt;::{}", self_type, trait_, name)
490+
}
488491
clean::Unique(..) => {
489492
panic!("should have been cleaned")
490493
}

0 commit comments

Comments
 (0)