Skip to content

Commit d573e1d

Browse files
committed
---
yaml --- r: 174747 b: refs/heads/snap-stage3 c: 159236a h: refs/heads/master i: 174745: e54566c 174743: 85dbc6e v: v3
1 parent ebaf25f commit d573e1d

File tree

3 files changed

+28
-6
lines changed

3 files changed

+28
-6
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
refs/heads/master: a0f86de49748b472d4d189d9688b0d856c000914
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
4-
refs/heads/snap-stage3: 8224e0ed3d65748df4e3a89a1076ffae629e2acb
4+
refs/heads/snap-stage3: 159236a63b64fec9aec6e1d36ee4e1c811747240
55
refs/heads/try: 08f6380a9f0b866796080094f44fe25ea5636547
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/dist-snap: ba4081a5a8573875fed17545846f6f6902c8ba8d

branches/snap-stage3/src/librustdoc/clean/inline.rs

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -319,9 +319,21 @@ fn build_impl(cx: &DocContext, tcx: &ty::ctxt,
319319
};
320320
Some(item)
321321
}
322-
ty::TypeTraitItem(_) => {
323-
// FIXME(pcwalton): Implement.
324-
None
322+
ty::TypeTraitItem(ref assoc_ty) => {
323+
let did = assoc_ty.def_id;
324+
let type_scheme = ty::lookup_item_type(tcx, did);
325+
// Not sure the choice of ParamSpace actually matters here, because an
326+
// associated type won't have generics on the LHS
327+
let typedef = (type_scheme, subst::ParamSpace::TypeSpace).clean(cx);
328+
Some(clean::Item {
329+
name: Some(assoc_ty.name.clean(cx)),
330+
inner: clean::TypedefItem(typedef),
331+
source: clean::Span::empty(),
332+
attrs: vec![],
333+
visibility: None,
334+
stability: stability::lookup(tcx, did).clean(cx),
335+
def_id: did
336+
})
325337
}
326338
}
327339
}).collect();

branches/snap-stage3/src/librustdoc/clean/mod.rs

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2520,14 +2520,14 @@ impl Clean<Item> for ty::AssociatedType {
25202520
source: DUMMY_SP.clean(cx),
25212521
name: Some(self.name.clean(cx)),
25222522
attrs: Vec::new(),
2523-
// FIXME(#18048): this is wrong, but cross-crate associated types are broken
2524-
// anyway, for the time being.
25252523
inner: AssociatedTypeItem(TyParam {
25262524
name: self.name.clean(cx),
25272525
did: ast::DefId {
25282526
krate: 0,
25292527
node: ast::DUMMY_NODE_ID
25302528
},
2529+
// FIXME(#20727): bounds are missing and need to be filled in from the
2530+
// predicates on the trait itself
25312531
bounds: vec![],
25322532
default: None,
25332533
}),
@@ -2559,6 +2559,16 @@ impl Clean<Item> for ast::Typedef {
25592559
}
25602560
}
25612561

2562+
impl<'a> Clean<Typedef> for (ty::TypeScheme<'a>, ParamSpace) {
2563+
fn clean(&self, cx: &DocContext) -> Typedef {
2564+
let (ref ty_scheme, ps) = *self;
2565+
Typedef {
2566+
type_: ty_scheme.ty.clean(cx),
2567+
generics: (&ty_scheme.generics, ps).clean(cx)
2568+
}
2569+
}
2570+
}
2571+
25622572
fn lang_struct(cx: &DocContext, did: Option<ast::DefId>,
25632573
t: ty::Ty, name: &str,
25642574
fallback: fn(Box<Type>) -> Type) -> Type {

0 commit comments

Comments
 (0)