Closed
Description
I tried this code:
mod my_mod {
pub trait Foo {}
}
pub mod prelude {
pub use super::my_mod::Foo as _;
}
I expected to see this happen: rustdoc shows that the prelude re-exports
Instead, this happened: rustdoc shows the module as empty
This is a regression from #97617, which explicitly implements the above behaviour (CC @GuillaumeGomez). This makes it hard to figure out from the documentation which kinds of traits importing a prelude-style module would bring into scope unless the prelude re-exports them with an actual name. Re-exporting with an actual name is not necessary for extension traits though.
Meta
rustc --version --verbose
:
rustc 1.69.0-nightly (001a77fac 2023-01-30)
binary: rustc
commit-hash: 001a77fac33f6560ff361ff38f661ff5f1c6bf85
commit-date: 2023-01-30
host: x86_64-unknown-linux-gnu
release: 1.69.0-nightly
LLVM version: 15.0.7
@rustbot modify labels: regression-untriaged