`log` is ambiguous
yonathanYPP opened this issue · comments
Hello, i keep getting an error on the rocket_cors crate if i use window os, but using my ubuntu os, the code is still error and when i cargo run, the project is running well.
error[E0659]: `log` is ambiguous (name vs any other name during import resolution)
--> C:\Users\Halobro\.cargo\registry\src\github.com-1ecc6299db9ec823\rocket_cors-0.5.1\src\fairing.rs:3:5
|
3 | use log::{error, info, log};
| ^^^ ambiguous name
|
= note: `log` could refer to a crate passed with `--extern`
= help: use `::log` to refer to this crate unambiguously
note: `log` could also refer to the crate imported here
--> C:\Users\Halobro\.cargo\registry\src\github.com-1ecc6299db9ec823\rocket_cors-0.5.1\src\fairing.rs:3:24
|
3 | use log::{error, info, log};
| ^^^
= help: use `self::log` to refer to this crate unambiguously
error[E0659]: `log` is ambiguous (name vs any other name during import resolution)
--> C:\Users\Halobro\.cargo\registry\src\github.com-1ecc6299db9ec823\rocket_cors-0.5.1\src\lib.rs:284:5
|
284 | use log::{debug, error, info, log};
| ^^^ ambiguous name
|
= note: `log` could refer to a crate passed with `--extern`
= help: use `::log` to refer to this crate unambiguously
note: `log` could also refer to the crate imported here
--> C:\Users\Halobro\.cargo\registry\src\github.com-1ecc6299db9ec823\rocket_cors-0.5.1\src\lib.rs:284:31
|
284 | use log::{debug, error, info, log};
| ^^^
= help: use `crate::log` to refer to this crate unambiguously
error: aborting due to 2 previous errors
For more information about this error, try `rustc --explain E0659`.
error: could not compile `rocket_cors`.
On windows os, these errors prevent the project to run. I am looking for any help, thanks and sorry for my bad english.
rocket_cors = "0.5.1"
Can you run rustc --version
on both Windows and Ubuntu please?
this my linux/wsl and ubuntu :
rustc 1.43.0-nightly (c20d7eecb 2020-03-11)
this is my windows :
rustc 1.43.0-nightly (c20d7eecb 2020-03-11)
it's the same
I will look into a fix and update this issue.
ok thanks a lot, i really appreciate that, and i really like your nice crate 👍
Can you try 0.5.2
please? https://crates.io/crates/rocket_cors/0.5.2
I've just released it.
I couldn't reproduce your error with the latest version of the crate.
I am closing this because I assume the issue has been fixed due to a lack of response. If that is not the case, please feel free to reopen it.