You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Rustdoc renders Vec's new allocator type parameter even when set to the default #80379
I came across another instance of this recently (#89712), but with a twist. The type that was re-exported also contained a type alias, which was expanded in the re-exported version. Is that the same bug or slightly different?
I came across another instance of this recently (#89712), but with a twist. The type that was re-exported also contained a type alias, which was expanded in the re-exported version. Is that the same bug or slightly different?
I suspect they're both caused by using metadata loading instead of HIR, if that's what you're asking, but the fix for the two will likely look different.
Activity
jyn514 commentedon Dec 26, 2020
The difference is that this is a cross-crate re-export. MCVE:
jyn514 commentedon Dec 26, 2020
This is a bug at least back to 1.22.0.
jyn514 commentedon Dec 26, 2020
In the inner crate, the params never get passes to
renderin the first place:but in the outer one they do show up:
I expect this has to do with some difference between HIR and metadata loading.
jyn514 commentedon Dec 26, 2020
I thought this might be related to inlining, but using

doc(inline)within the same crate works fine:jyn514 commentedon Dec 26, 2020
The issue is that metadata types, unlike HIR types, go through
external_path:rust/src/librustdoc/clean/mod.rs
Line 1584 in 89524d0
and external_path doesn't pay any attention to the type defaults:
rust/src/librustdoc/clean/utils.rs
Line 103 in 89524d0
So rustdoc needs to know which of the generic arguments were added by the user and which are just defaults.
jyn514 commentedon Jan 3, 2021
cc https://rust-lang.zulipchat.com/#narrow/stream/266220-rustdoc/topic/What.20is.20the.20difference.20between.20AssocTypeItem.20and.20TypedefItem/near/221461855
Auto merge of rust-lang#80661 - jyn514:duplicate-types, r=GuillaumeGomez
camelid commentedon Oct 10, 2021
I came across another instance of this recently (#89712), but with a twist. The type that was re-exported also contained a type alias, which was expanded in the re-exported version. Is that the same bug or slightly different?
fmease commentedon Jan 19, 2023
@rustbot claim
jyn514 commentedon Jan 19, 2023
I suspect they're both caused by using metadata loading instead of HIR, if that's what you're asking, but the fix for the two will likely look different.
Auto merge of rust-lang#112463 - fmease:rustdoc-elide-x-crate-def-gen…
Auto merge of rust-lang#112463 - fmease:rustdoc-elide-x-crate-def-gen…
Auto merge of rust-lang#112463 - fmease:rustdoc-elide-x-crate-def-gen…
Rollup merge of rust-lang#112463 - fmease:rustdoc-elide-x-crate-def-g…
Rollup merge of rust-lang#112463 - fmease:rustdoc-elide-x-crate-def-g…
Unrolled build for rust-lang#112463