Description
I wanted to do a simple task: silence all but one particular rustc lint.
rustc -Awarnings
"allows" all the warnings, easy so we only need to re-warn a single lint:
rustc -Awarnings -Wdead-code
As it turns out this does not work, -Awarnings
does silence all lints, even the ones enabled again after the flag (order does not matter it seems).
Similar thing works just fine with clippy: clippy-driver -Aclippy::all -Wclippy::redundant_clone
only warns about redundant clones`
I found out I can archive this for rustc by passing force-warn
with every lint manually, so
rustc/clippy-driver -Awarnings --force-warn dead-code --force-warn clippy::redundant_clone
but this is kinda horribly UX imo.
Can we just make -Awarnings -Wunused_variables
work intuitively?