rustdoc: Only link to local inlined foreign items
This commit alters rustdoc to keep a hash set of known inlined items which is a whitelist for generating URLs to. Closes #14438
This commit is contained in:
@@ -150,7 +150,7 @@ fn resolved_path(w: &mut fmt::Formatter, did: ast::DefId, p: &clean::Path,
|
||||
print_all: bool) -> fmt::Result {
|
||||
path(w, p, print_all,
|
||||
|cache, loc| {
|
||||
if ast_util::is_local(did) || cache.paths.contains_key(&did) {
|
||||
if ast_util::is_local(did) || cache.inlined.contains(&did) {
|
||||
Some(("../".repeat(loc.len())).to_string())
|
||||
} else {
|
||||
match *cache.extern_locations.get(&did.krate) {
|
||||
|
||||
Reference in New Issue
Block a user