rust-lang / rust

Empowering everyone to build reliable and efficient software.
https://www.rust-lang.org
Other
97.47k stars 12.6k forks source link

Forbidding import shadowing has bad interactions with `pub use glob::*` and tests #16890

Closed andrew-d closed 10 years ago

andrew-d commented 10 years ago

In short, I'm working with sodiumoxide, and running tests fails with something like this:

src/sodiumoxide/crypto/secretbox.rs:26:9: 26:35 error: import `__test_reexports` conflicts with type in this module
src/sodiumoxide/crypto/secretbox.rs:26 pub use self::xsalsa20poly1305::*;
                                               ^~~~~~~~~~~~~~~~~~~~~~~~~~
src/sodiumoxide/lib.rs:1:1: 1:1 note: note conflicting type here
src/sodiumoxide/lib.rs:1 /*!
                         ^
src/sodiumoxide/crypto/sign.rs:28:9: 28:26 error: import `__test_reexports` conflicts with type in this module
src/sodiumoxide/crypto/sign.rs:28 pub use self::ed25519::*;
                                          ^~~~~~~~~~~~~~~~~
src/sodiumoxide/lib.rs:1:1: 1:1 note: note conflicting type here
src/sodiumoxide/lib.rs:1 /*!
                         ^
src/sodiumoxide/crypto/shorthash.rs:17:9: 17:28 error: import `__test_reexports` conflicts with type in this module
src/sodiumoxide/crypto/shorthash.rs:17 pub use self::siphash24::*;
                                               ^~~~~~~~~~~~~~~~~~~
src/sodiumoxide/lib.rs:1:1: 1:1 note: note conflicting type here
src/sodiumoxide/lib.rs:1 /*!

There are actually more errors, all of the same format. This pretty much breaks pub use glob::* entirely - I haven't been able to find a workaround (short of just explicitly stating what to use, which kind of defeats the purpose).

bkoropoff commented 10 years ago

This looks like #16597

sfackler commented 10 years ago

Closing as a dupe of #16597.

andrew-d commented 10 years ago

Aha, didn't see that one. Thanks!