Skip to content
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

Using cargo clippy with -Z build-std produces warnings inside of libcore #4563

Closed
alex opened this issue Sep 21, 2019 · 4 comments
Closed

Using cargo clippy with -Z build-std produces warnings inside of libcore #4563

alex opened this issue Sep 21, 2019 · 4 comments

Comments

@alex
Copy link
Member

alex commented Sep 21, 2019

If you attempt to use cargo clippy with the new cargo support for building the standard libraries (obsoleting cargo-xbuild and xargo), clippy will emit tons of warnings inside of libcore.

Usage: cargo clippy -Z build-std=core,alloc --target=<anything>

You can see an example of this failing here: https://travis-ci.com/fishinabarrel/linux-kernel-module-rust/builds/128613174

@mati865
Copy link
Contributor

mati865 commented Sep 22, 2019

Could you try using cargo clippy-preview? Probably you will also have to use -Z unstable-options.

@alex
Copy link
Member Author

alex commented Sep 22, 2019

Yes, indeed with clippy-preview + -Z unstable-options this seems resolved.

@mati865
Copy link
Contributor

mati865 commented Sep 22, 2019

It doesn't seem worth fixing then, soon cargo clippy will work just like cargo clippy-preview right now: rust-lang/cargo#7382

@alex
Copy link
Member Author

alex commented Sep 22, 2019

Agreed.

@alex alex closed this as completed Sep 22, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants