Parameterized lints (unused_must_use)


Some lints should be parameterized, an good example is unused_must_use. Sometimes you want to ignore Result but not ignore anything else:

fn main() {
use std::fs::write as w;
w("foo", foo());
w("bar", bar());
// ...

This should be possible.


I think this would require an RFC.

Personally, I’d want to see a lot more use-cases to be convinced that the extra complexity would be worth the gain in functionality. (Why would you want to ignore specifically all Results in a given scope? What other lints would benefit from parametrization?)


Why not use question-mark-in-main and then ? on those writes?