Closed
Description
Given a two crate set up:
-
Crate
a
:[package] name = "a" version = "0.1.0" edition = "2018"
/// I am `a::Foo` pub struct Foo;
-
Crate
b
:[package] name = "b" version = "0.1.0" edition = "2018" [dependencies] a = { path = "../a" }
pub use a::*; /// I am `b::Foo` pub struct Foo;
Documentation for crate b
lists two Foo
types, with the a::Foo
one being inaccessible because it is actually hidden by b::Foo
:
If you change a
to a module instead of a separate crate, then only b::Foo
type is listed in docs.
mod a {
/// I am `b::a::Foo`
pub struct Foo;
}
pub use self::a::*;
/// I am `b::Foo`
pub struct Foo;
rustc --version --verbose
:
rustc 1.42.0 (b8cedc004 2020-03-09)
binary: rustc
commit-hash: b8cedc00407a4c56a3bda1ed605c6fc166655447
commit-date: 2020-03-09
host: x86_64-pc-windows-msvc
release: 1.42.0
LLVM version: 9.0
Real world example of this: diesel::r2d2
lists a struct Error
which is defined by diesel, and an enum Error
which is glob-reexported from r2d2
.