Skip to content

Commit ec509ab

Browse files
committed
---
yaml --- r: 164827 b: refs/heads/try c: d8e51ea h: refs/heads/master i: 164825: 9b39bfd 164823: 6c41a66 v: v3
1 parent 63b32e6 commit ec509ab

File tree

3 files changed

+28
-4
lines changed

3 files changed

+28
-4
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
refs/heads/master: f8f2c7a9537c7f333b242f616aefb75a83860927
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: 8443b09e361b96d1f9b7f45a65ed0d31c0e86e70
5-
refs/heads/try: d258d68db6ae5ad81e4b8b4f5fcc1e4d89624f97
5+
refs/heads/try: d8e51ea0e2e0c7d363a4202c0ae395f320a19f3d
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/dist-snap: ba4081a5a8573875fed17545846f6f6902c8ba8d
88
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596

branches/try/src/librustdoc/clean/mod.rs

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1165,12 +1165,19 @@ pub enum Type {
11651165
mutability: Mutability,
11661166
type_: Box<Type>,
11671167
},
1168+
1169+
// <Type as Trait>::Name
11681170
QPath {
11691171
name: String,
11701172
self_type: Box<Type>,
11711173
trait_: Box<Type>
11721174
},
1173-
// region, raw, other boxes, mutable
1175+
1176+
// _
1177+
Infer,
1178+
1179+
// for<'a> Foo(&'a)
1180+
PolyTraitRef(Vec<TyParamBound>),
11741181
}
11751182

11761183
#[deriving(Clone, Encodable, Decodable, PartialEq, Eq, Hash)]
@@ -1307,11 +1314,18 @@ impl Clean<Type> for ast::Ty {
13071314
}
13081315
}
13091316
TyClosure(ref c) => Closure(box c.clean(cx)),
1310-
TyProc(ref c) => Proc(box c.clean(cx)),
13111317
TyBareFn(ref barefn) => BareFunction(box barefn.clean(cx)),
13121318
TyParen(ref ty) => ty.clean(cx),
13131319
TyQPath(ref qp) => qp.clean(cx),
1314-
ref x => panic!("Unimplemented type {}", x),
1320+
TyPolyTraitRef(ref bounds) => {
1321+
PolyTraitRef(bounds.clean(cx))
1322+
},
1323+
TyInfer(..) => {
1324+
Infer
1325+
},
1326+
TyTypeof(..) => {
1327+
panic!("Unimplemented type {}", self.node)
1328+
},
13151329
}
13161330
}
13171331
}

branches/try/src/librustdoc/html/format.rs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -390,6 +390,16 @@ impl fmt::Show for clean::Type {
390390
try!(resolved_path(f, did, path, false));
391391
tybounds(f, typarams)
392392
}
393+
clean::PolyTraitRef(ref bounds) => {
394+
for (i, bound) in bounds.iter().enumerate() {
395+
if i != 0 {
396+
try!(write!(f, " + "));
397+
}
398+
try!(write!(f, "{}", *bound));
399+
}
400+
Ok(())
401+
}
402+
clean::Infer => write!(f, "_"),
393403
clean::Self(..) => f.write("Self".as_bytes()),
394404
clean::Primitive(prim) => primitive_link(f, prim, prim.to_string()),
395405
clean::Closure(ref decl) => {

0 commit comments

Comments
 (0)