From 50ec2cb55cbfceaba12ee17156480adf987efc0f 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 2ad8be462b2da..42b96e12a816a 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; } }