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

compile error with uniform_paths: the name _ is defined multiple times #53691

Closed
jbg opened this issue Aug 25, 2018 · 2 comments · Fixed by #53993
Closed

compile error with uniform_paths: the name _ is defined multiple times #53691

jbg opened this issue Aug 25, 2018 · 2 comments · Fixed by #53993
Assignees

Comments

@jbg
Copy link

jbg commented Aug 25, 2018

Cargo.toml

cargo-features = ["edition"]

[package]
edition = "2018"
name = "lazy_static_and_log"
version = "0.1.0"

[dependencies]
lazy_static = "*"
log = "*"

src/lib.rs

#![feature(uniform_paths)]

use lazy_static::lazy_static;
use log::*;

pub fn foo() {}

src/bin/foo.rs

use lazy_static_and_log;

fn main() {
    lazy_static_and_log::foo();
}

Compile error:

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

error: aborting due to previous error

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

Notes:
Building only the library with cargo build --lib works. Only the binary fails to build. If log::* is changed to e.g. log::info then compilation succeeds.

The error message doesn't provide enough information about which symbols are considered duplicate, as neither crate appears to have a macro named _, and in any case I am only importing the lazy_static macro from the lazy_static crate.

rustc version:
rustc 1.30.0-nightly (63d66494a 2018-08-23)

@Neurrone
Copy link

Neurrone commented Sep 2, 2018

I have a similar problem, except that the error message says type namespace, and it provides no information I can use for debugging.

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

@eddyb eddyb self-assigned this Sep 6, 2018
@eddyb
Copy link
Member

eddyb commented Sep 6, 2018

Duplicate of #53484.

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
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants