-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
cargo clippy and cargo check don't recognize source code changes without --release flag #9004
Comments
I just realized that the issue happens when I run the commands inside the VS Code terminal, but not when I run the commands inside the macOS built-in "Terminal" app. Although I'm not sure, this looks like an issue with VS Code and not with Cargo. I'll investigate more later this week. |
I believe this is rust-lang/rust-clippy#4612 |
Alright, but just to be clear, the issue happens even if I never run |
I guess this is due to rust-analyzer (or rls) automatically run |
Bingo! That explains both why the issue happens even if I don't run Thanks, can't wait for this fix! |
Closing as a duplicate of rust-lang/rust-clippy#4612. |
Problem
cargo clippy
andcargo check
don't recognize source code changes unless they are run with the--release
flag (see steps below). I expect that both commands should output the same thing (e.g. same lints forcargo clippy
) with or without the--release
flag when the source code changes.Steps
cargo new playground
andcd
into the project root.cargo clippy
and the output is:cargo clippy --release
and the output is:()
on a new line after the print statement insrc/main.rs
.cargo clippy
and the output is:cargo clippy --release
and the output is:Notes
Output of
cargo version
: cargo 1.48.0 (65cbdd2 2020-10-14)I'm using the current latest stable version of rustc.
Output of
rustc --version
: rustc 1.48.0 (7eac88abb 2020-11-16)The problem is happening on both my personal and work laptops, both of which are macOS. My personal laptop is running macOS Big Sur (version 11.1) and my work laptop is running macOS Catalina (version 10.15.7). As far as I know, I haven't modified the default cargo settings on either of my laptops.
The text was updated successfully, but these errors were encountered: