-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Clippy cannot find 'std' with non-standard libdir #2874
Comments
It could be fixed by |
Looks like clippy gets wrong clippy searches
rustc searches
|
Session.default_sysroot = None
Session.opts.maybe_sysroot = Some("") Rustc: Session.default_sysroot = Some("/usr")
Session.opts.maybe_sysroot = None |
|
Whoa, great analysis! Thanks The culprit is most likey https://github.com/rust-lang-nursery/rust-clippy/blob/master/src/driver.rs#L70 which was necessary to get clippy to work back in the day. We probably don't need it anymore now that clippy is distributed with rustup. |
Would be good if it could be removed because I've tried to add panics to
|
OH! that makes total sense. It used to be that everyone built clippy on their own system. So in that case this would still make sense probably. We need to tread carefully here, but I think it's fine to get rid of the entire sysroot hackery |
What if get sysroot from internals of rustc? Oh, removing sysroot argument would actually do this. |
This reverts commit 041c49c, reversing changes made to 1df5766. This broke clippy working when installed from the git repo via cargo install. Fixes rust-lang#3523 Reopens rust-lang#2874
The fix pr had to be reverted. |
Looks like built-in clippy compiled with |
This should've been fixed here: f5db351 It is also tested by our CI, that |
When I try even hello world project I got error:
Clippy version: 0.0.210
Rustc version:
Rustc built with non-standart libdir and libstd placed there:
Rustc successfully builds programs but clippy fails to check it.
The text was updated successfully, but these errors were encountered: