Open
Description
I tried this code (ZIP of project):
├── Cargo.lock
├── Cargo.toml
├── regular-items
│ ├── Cargo.toml
│ └── src
│ └── lib.rs
└── src
└── lib.rs
src/lib.rs
/// This documentation for `CONSTANT` comes from a cross-crate re-export.
pub use regular_items::CONSTANT;
/// This documentation for `function` comes from a cross-crate re-export.
pub use regular_items::function;
pub mod prelude {
pub use crate::{CONSTANT, function};
}
regular-items/src/lib.rs
pub const CONSTANT: u8 = 0;
pub fn function() {}
I then viewed the documentation for
I expected:
- That the documentation added to
crate::CONSTANT
would be present oncrate::prelude::CONSTANT
. - That
crate::prelude::CONSTANT
would redirect tocrate::CONSTANT
.
Instead:
- No documentation is present on
crate::prelude::CONSTANT
. crate::prelude::CONSTANT
appears to be a different item thancrate::CONSTANT
.
Meta
cargo +nightly --version --verbose
:
cargo 1.56.0-nightly (e515c3277 2021-09-08)
release: 1.56.0
commit-hash: e515c3277bf0681bfc79a9e763861bfe26bb05db
commit-date: 2021-09-08