profusion of redundant "overruled by outer forbid" messages #42873
Labels
A-lints
Area: Lints (warnings about flaws in source code) such as unused_mut.
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
Consider this (erroneous) program:
As we expect, this fails to compile, because the outer "forbid" attribute contradicts the "allow" attribute. ("Forbid" is like "deny" except that it prevents itself from being subsequently overridden.) However, the error messages leave something to be desired:
We get a separate error for each lint in the "unused" lint group! This is kind of terrible! We would prefer to get a single error for the contradicting attributes, whose message names the offending attributes (it's weird to say "overruled by outer forbid(path_statements)", when the outer forbid is for unused, not path_statements).
A fix by the present author is forthcoming.
The text was updated successfully, but these errors were encountered: