Closed
Description
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)
Metadata
Metadata
Assignees
Labels
No labels