Docs produce invalid type when using bounds in associated type position #126432
Open
Description
When using bounds in associated type position on a re-exported function or trait from another crate, the docs produces invalid type.
// In crate A
pub fn debug_iter() -> impl Iterator<Item: core::fmt::Debug> {
core::iter::empty::<u8>()
}
// In crate B
pub use A::debug_iter;
// cargo doc -p A
pub fn debug_iter() -> impl Iterator<Item: Debug>
// cargo doc -p B
pub fn debug_iter() -> impl Iterator + Debug
Meta
rustc --version --verbose
:
rustc 1.81.0-nightly (8337ba918 2024-06-12)
binary: rustc
commit-hash: 8337ba9189de188e2ed417018af2bf17a57d51ac
commit-date: 2024-06-12
host: x86_64-pc-windows-msvc
release: 1.81.0-nightly
LLVM version: 18.1.7