You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Then in addition to the "unused variable" warning that you currently get:
unused_var.rs:2:9: 2:10 warning: unused variable: `x`, #[warn(unused_variables)] on by default
unused_var.rs:2 for x in [1,2,3].iter() {
^
it should also display a note, perhaps saying
note: to disable this warning, consider using `_x` or `_` instead
Barring that, the lint could have an error code and the error explanation could mention that you can disable the warning in either of these ways.
I'm not sure if this note should only be displayed with for loops (and similar situations), or if it should be unconditionally displayed alongside the "unused variable" warning.