From e44a84e7cda443e525e91885700db7719e75b6f2 Mon Sep 17 00:00:00 2001 From: Alex Crichton Date: Mon, 12 May 2014 13:40:11 -0700 Subject: [PATCH] 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 --- src/librustdoc/passes.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/librustdoc/passes.rs b/src/librustdoc/passes.rs index 9ba8e1e9a96..a4491817479 100644 --- a/src/librustdoc/passes.rs +++ b/src/librustdoc/passes.rs @@ -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; } }