Rollup merge of #109534 - petrochenkov:noprimuse, r=GuillaumeGomez
rustdoc: Unsupport importing `doc(primitive)` and `doc(keyword)` modules These are internal features used for a specific purpose, and modules without imports are enough for that purpose.
This commit is contained in:
commit
1db9eae033
@ -232,14 +232,6 @@ pub(crate) fn keywords(&self, tcx: TyCtxt<'_>) -> ThinVec<(DefId, Symbol)> {
|
|||||||
hir::ItemKind::Mod(_) => {
|
hir::ItemKind::Mod(_) => {
|
||||||
as_keyword(Res::Def(DefKind::Mod, id.owner_id.to_def_id()))
|
as_keyword(Res::Def(DefKind::Mod, id.owner_id.to_def_id()))
|
||||||
}
|
}
|
||||||
hir::ItemKind::Use(path, hir::UseKind::Single)
|
|
||||||
if tcx.visibility(id.owner_id).is_public() =>
|
|
||||||
{
|
|
||||||
path.res
|
|
||||||
.iter()
|
|
||||||
.find_map(|res| as_keyword(res.expect_non_local()))
|
|
||||||
.map(|(_, prim)| (id.owner_id.to_def_id(), prim))
|
|
||||||
}
|
|
||||||
_ => None,
|
_ => None,
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
@ -302,15 +294,6 @@ pub(crate) fn primitives(&self, tcx: TyCtxt<'_>) -> ThinVec<(DefId, PrimitiveTyp
|
|||||||
hir::ItemKind::Mod(_) => {
|
hir::ItemKind::Mod(_) => {
|
||||||
as_primitive(Res::Def(DefKind::Mod, id.owner_id.to_def_id()))
|
as_primitive(Res::Def(DefKind::Mod, id.owner_id.to_def_id()))
|
||||||
}
|
}
|
||||||
hir::ItemKind::Use(path, hir::UseKind::Single)
|
|
||||||
if tcx.visibility(id.owner_id).is_public() =>
|
|
||||||
{
|
|
||||||
path.res
|
|
||||||
.iter()
|
|
||||||
.find_map(|res| as_primitive(res.expect_non_local()))
|
|
||||||
// Pretend the primitive is local.
|
|
||||||
.map(|(_, prim)| (id.owner_id.to_def_id(), prim))
|
|
||||||
}
|
|
||||||
_ => None,
|
_ => None,
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
|
|
||||||
pub use issue_15318::ptr;
|
pub use issue_15318::ptr;
|
||||||
|
|
||||||
// @has issue_15318_2/fn.bar.html \
|
// @!has issue_15318_2/fn.bar.html \
|
||||||
// '//*[@href="primitive.pointer.html"]' \
|
// '//*[@href="primitive.pointer.html"]' \
|
||||||
// '*mut T'
|
// '*mut T'
|
||||||
pub fn bar<T>(ptr: *mut T) {}
|
pub fn bar<T>(ptr: *mut T) {}
|
||||||
|
Loading…
Reference in New Issue
Block a user