-
Notifications
You must be signed in to change notification settings - Fork 1.7k
multiple matching crates for rustc_serialize
panic
#1638
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
Comments
You should delete the build directory. |
Okay, that works for my (I guess too-minimal) test case, but not for the app I originally had the problem with, as that one also uses the Cargo.toml:[dependencies]
rust-crypto = "^0.2" Cargo.lock (relevant lines)[[package]]
name = "rust-crypto"
version = "0.2.36"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"gcc 0.3.45 (registry+https://github.com/rust-lang/crates.io-index)",
"libc 0.2.21 (registry+https://github.com/rust-lang/crates.io-index)",
"rand 0.3.15 (registry+https://github.com/rust-lang/crates.io-index)",
"rustc-serialize 0.3.23 (registry+https://github.com/rust-lang/crates.io-index)",
"time 0.1.36 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "rustc-serialize"
version = "0.3.23"
source = "registry+https://github.com/rust-lang/crates.io-index" Output➜ rm -rf target && cargo clippy ~/tmp/clippy_panic
Compiling rustc-serialize v0.3.23
Compiling gcc v0.3.45
Compiling libc v0.2.21
Compiling time v0.1.36
Compiling rand v0.3.15
Compiling rust-crypto v0.2.36
Compiling five v0.1.0 (file:///Users/gib/tmp/clippy_panic)
error[E0464]: multiple matching crates for `rustc_serialize`
--> src/main.rs:2:1
|
2 | extern crate rustc_serialize;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: candidates:
= note: path: /Users/gib/tmp/clippy_panic/target/debug/deps/librustc_serialize-54d2bf33b1d4b0b0.rlib
= note: crate name: rustc_serialize
= note: path: /Users/gib/.rustup/toolchains/nightly-x86_64-apple-darwin/lib/rustlib/x86_64-apple-darwin/lib/librustc_serialize-fde13340fc7641e7.rlib
= note: crate name: rustc_serialize
error[E0463]: can't find crate for `rustc_serialize`
--> src/main.rs:2:1
|
2 | extern crate rustc_serialize;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ can't find crate
error: aborting due to 2 previous errors
thread 'rustc' panicked at 'Box<Any>', src/librustc_errors/lib.rs:455
note: Run with `RUST_BACKTRACE=1` for a backtrace.
thread 'main' panicked at 'rustc_thread failed: Any', src/libcore/result.rs:859
error: Could not compile `five`.
To learn more, run the command again with --verbose. |
Does building with |
Yep, building works fine: ➜ clippy_panic git:(master) cargo run ~/tmp/clippy_panic
Finished dev [unoptimized + debuginfo] target(s) in 0.0 secs
Running `target/debug/clippy_panic`
Use toHex: ff I made a repo for the source in case you wanted to try it out: https://github.com/gibfahn/clippy-panic
|
|
Thanks, trying it now |
Oh sorry, I assumed
|
We additionally pass |
That seems like the issue, cargo rustc -- -L target/debug/deps -Zno-trans --cfg 'feature="cargo-clippy"' Fails with the above error. |
It's a remnant from the time when we needed the clippy plugin to run cargo clippy. Nowadays |
Uh oh!
There was an error while loading. Please reload this page.
Minimal repro:
nightly-x86_64-apple-darwin - rustc 1.17.0-nightly (49c67bd63 2017-03-24)
v0.0.121
Error:
The text was updated successfully, but these errors were encountered: