Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

error[E0428]: the name _ is defined multiple times | using 2018 edition and uniform paths #53484

Closed
sbstp opened this issue Aug 19, 2018 · 2 comments · Fixed by #53993
Closed
Assignees
Labels
A-diagnostics Area: Messages for errors, warnings, and lints

Comments

@sbstp
Copy link

sbstp commented Aug 19, 2018

This error comes from an example file that uses the library I'm working on. The library itself compiles fine, the example does not. Full error:

error[E0428]: the name `_` is defined multiple times
 |
 = note: `_` must be defined only once in the type namespace of this module

error: aborting due to previous error

For more information about this error, try `rustc --explain E0428`.
error: Could not compile `tinyhttp`.

The bug only occurs when I use a relative pub use.

// src/lib.rs
pub use crate::error::{HttpError, HttpResult}; // OK
pub use crate::request::parse::ResponseReader; // OK
pub use error::{HttpError, HttpResult}; // BREAKS
pub use request::parse::ResponseReader; // BREAKS

Using rustc 1.30.0-nightly (b2028828d 2018-08-16) on Debian sid amd64

The full project source can be found here. The error occurs in examples/cat.rs.

@eddyb
Copy link
Member

eddyb commented Aug 19, 2018

cc @petrochenkov I didn't realize this would happen, but we lose the gensym cross-crate (we should really avoid doing that, but that seems hard) - probably just need to avoid leaving the canaries in any sort of export maps, for now.

@petrochenkov
Copy link
Contributor

avoid leaving the canaries in any sort of export maps, for now

Yes, looks like a good short-term solution.

@estebank estebank added the A-diagnostics Area: Messages for errors, warnings, and lints label Aug 22, 2018
@eddyb eddyb self-assigned this Sep 6, 2018
kennytm added a commit to kennytm/rust that referenced this issue Sep 7, 2018
rustc_resolve: don't record uniform_paths canaries as reexports.

Fixes rust-lang#53691, fixes rust-lang#53484.
kennytm added a commit to kennytm/rust that referenced this issue Sep 8, 2018
rustc_resolve: don't record uniform_paths canaries as reexports.

Fixes rust-lang#53691, fixes rust-lang#53484.
kennytm added a commit to kennytm/rust that referenced this issue Sep 8, 2018
rustc_resolve: don't record uniform_paths canaries as reexports.

Fixes rust-lang#53691, fixes rust-lang#53484.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-diagnostics Area: Messages for errors, warnings, and lints
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants