By default, the VS Code extension rust-analyzer will run cargo check
on save. If you want to have warnings and errors from Clippy to show instead, change the command to clippy
in your settings.json
:
"rust-analyzer.check.command": "clippy"
Credit goes to 17cupsofcoffee for the solution. Thank you to Paul for the updated setting.