Few improvements
This commit is contained in:
parent
ebee483e24
commit
904f4921f8
@ -196,16 +196,16 @@ impl<'a, 'tcx, 'rcx> Clean<Crate> for visit_ast::RustdocVisitor<'a, 'tcx, 'rcx>
|
||||
inner: PrimitiveItem(prim),
|
||||
}
|
||||
}));
|
||||
m.items.extend(keywords.iter().map(|&(def_id, ref kw, ref attrs)| {
|
||||
m.items.extend(keywords.into_iter().map(|(def_id, kw, attrs)| {
|
||||
Item {
|
||||
source: Span::empty(),
|
||||
name: Some(kw.clone()),
|
||||
attrs: attrs.clone(),
|
||||
attrs: attrs,
|
||||
visibility: Some(Public),
|
||||
stability: get_stability(cx, def_id),
|
||||
deprecation: get_deprecation(cx, def_id),
|
||||
def_id,
|
||||
inner: KeywordItem(kw.clone()),
|
||||
inner: KeywordItem(kw),
|
||||
}
|
||||
}));
|
||||
}
|
||||
@ -330,7 +330,6 @@ impl Clean<ExternalCrate> for CrateNum {
|
||||
hir::ItemUse(ref path, hir::UseKind::Single)
|
||||
if item.vis == hir::Visibility::Public => {
|
||||
as_keyword(path.def).map(|(_, prim, attrs)| {
|
||||
// Pretend the primitive is local.
|
||||
(cx.tcx.hir.local_def_id(id.id), prim, attrs)
|
||||
})
|
||||
}
|
||||
|
@ -1557,7 +1557,7 @@ impl AllTypes {
|
||||
typedefs: HashSet::with_capacity(100),
|
||||
statics: HashSet::with_capacity(100),
|
||||
constants: HashSet::with_capacity(100),
|
||||
keywords: HashSet::with_capacity(10),
|
||||
keywords: HashSet::with_capacity(100),
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user