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:
Alex Crichton 2014-05-12 13:40:11 -07:00
parent c1da4f875f
commit e44a84e7cd

View File

@ -14,6 +14,7 @@ use std::cmp;
use std::strbuf::StrBuf;
use std::uint;
use syntax::ast;
use syntax::ast_util;
use clean;
use clean::Item;
@ -206,7 +207,7 @@ impl<'a> fold::DocFolder for ImplStripper<'a> {
match imp.trait_ {
Some(clean::ResolvedPath{ did, .. }) => {
let ImplStripper(s) = *self;
if !s.contains(&did.node) {
if ast_util::is_local(did) && !s.contains(&did.node) {
return None;
}
}