Skip to content

Tests failing with multiple matching crates for serde #4015

Closed
@phansch

Description

@phansch

rust-lang/rust#60053 broke the Clippy tests. Specifically tests/ui/serde.rs fails with:

error[E0464]: multiple matching crates for `serde`
  --> $DIR/serde.rs:4:1
   |
LL | extern crate serde;
   | ^^^^^^^^^^^^^^^^^^^
   |
   = note: candidates:
           crate `serde`: /home/<user>/code/rust-clippy/target/debug/deps/libserde-3ec33c1c405dbd9a.rlib
           crate `serde`: /home/<user>/.rustup/toolchains/master/lib/rustlib/x86_64-unknown-linux-gnu/lib/libserde-4b8bb77bdaea80db.rlib

error[E0463]: can't find crate for `serde`
  --> $DIR/serde.rs:4:1
   |
LL | extern crate serde;
   | ^^^^^^^^^^^^^^^^^^^ can't find crate

error: aborting due to 2 previous errors

For more information about this error, try `rustc --explain E0463`.

I'm not really sure how fix this. Maybe somewhere in compiletest-rs? The error still happens with a clean Rust master installation. Can we somehow ignore the sysroot serde?

cc Manishearth/compiletest-rs#114, rust-lang/rust#24853

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-bugCategory: Clippy is not doing the correct thing

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions