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