Skip to content

Clippy cannot find 'std' with non-standard libdir #2874

Closed
@o01eg

Description

@o01eg

When I try even hello world project I got error:

$ cargo clippy --verbose
    Checking tst001 v0.1.0 (file:///tmp/tst001)
     Running `/usr/bin/clippy-driver rustc --crate-name tst001 src/main.rs --crate-type bin --emit=dep-info,metadata -C debuginfo=2 -C metadata=9d53d8442a8c6217 -C extra-filename=-9d53d8442a8c6217 --out-dir /tmp/tst001/target/debug/deps -C incremental=/tmp/tst001/target/debug/incremental -L dependency=/tmp/tst001/target/debug/deps`
error[E0463]: can't find crate for `std`

error: Could not compile `tst001`.

Clippy version: 0.0.210
Rustc version:

rustc 1.28.0-dev (773ce53ce 2018-06-26)
binary: rustc
commit-hash: 773ce53ce7b3acb97cfbd3d189dc3fbf33ec05c6
commit-date: 2018-06-26
host: x86_64-unknown-linux-gnu
release: 1.28.0-dev
LLVM version: 6.0

Rustc built with non-standart libdir and libstd placed there:

/usr/lib64/rust-9999/libstd-c9650cebf997ec41.so
/usr/lib64/rust-9999/rustlib/x86_64-unknown-linux-gnu/lib/libstd-c9650cebf997ec41.rlib
/usr/lib64/rust-9999/rustlib/x86_64-unknown-linux-gnu/lib/libstd-c9650cebf997ec41.so

Rustc successfully builds programs but clippy fails to check it.

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