Code
#![feature(import_trait_associated_functions)]
pub trait Test {
fn method();
const CONST: usize;
type Type;
}
pub use self::Test::{method, CONST, Type};
Expected Outcome
The links for method, CONST, and Type re-exports should link to #tymethod.method, #asscociatedconst.CONST, and #associatedtype.Type rather than just the trait.
Actual Output
Generated rustdoc (relevant bits):
<h2 id="reexports" class="section-header">Re-exports<a href="#reexports" class="anchor">[§](https://github.com/rust-lang/rust/issues/new?template=rustdoc.md#reexports)</a></h2><dl class="item-table reexports"><dt id="reexport.[method](https://github.com/rust-lang/rust/issues/trait.Test.html)"><code>pub use self::Test::<a class="trait" href="trait.Test.html" title="trait rustdoc_issue::Test">method</a>;</code></dt><dt id="reexport.[CONST](https://github.com/rust-lang/rust/issues/trait.Test.html)"><code>pub use self::Test::<a class="trait" href="trait.Test.html" title="trait rustdoc_issue::Test">CONST</a>;</code></dt><dt id="reexport.[Type](https://github.com/rust-lang/rust/issues/trait.Test.html)"><code>pub use self::Test::<a class="trait" href="trait.Test.html" title="trait rustdoc_issue::Test">Type</a>;</code></dt></dl>
Note all the links go to just trait.Test.html without any anchors.
Version
$ rustdoc --version
rustdoc 1.92.0-nightly (57ef8d642 2025-10-15)
Additional Details
Tracking issue: #134691
Code
Expected Outcome
The links for
method,CONST, andTypere-exports should link to#tymethod.method,#asscociatedconst.CONST, and#associatedtype.Typerather than just the trait.Actual Output
Generated rustdoc (relevant bits):
Note all the links go to just
trait.Test.htmlwithout any anchors.Version
Additional Details
Tracking issue: #134691