rustdoc: Fix hiding implementations of traits
This bug was introduced when rustdoc gained the ability to hyperlink across crates in pub use statements. Closes #14125
This commit is contained in:
parent
c1da4f875f
commit
e44a84e7cd
@ -14,6 +14,7 @@ use std::cmp;
|
|||||||
use std::strbuf::StrBuf;
|
use std::strbuf::StrBuf;
|
||||||
use std::uint;
|
use std::uint;
|
||||||
use syntax::ast;
|
use syntax::ast;
|
||||||
|
use syntax::ast_util;
|
||||||
|
|
||||||
use clean;
|
use clean;
|
||||||
use clean::Item;
|
use clean::Item;
|
||||||
@ -206,7 +207,7 @@ impl<'a> fold::DocFolder for ImplStripper<'a> {
|
|||||||
match imp.trait_ {
|
match imp.trait_ {
|
||||||
Some(clean::ResolvedPath{ did, .. }) => {
|
Some(clean::ResolvedPath{ did, .. }) => {
|
||||||
let ImplStripper(s) = *self;
|
let ImplStripper(s) = *self;
|
||||||
if !s.contains(&did.node) {
|
if ast_util::is_local(did) && !s.contains(&did.node) {
|
||||||
return None;
|
return None;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user