#[allow(...)]
doesn't work on expressions
#97748
Labels
A-diagnostics
Area: Messages for errors, warnings, and lints
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
Given the following code: https://play.rust-lang.org/?version=nightly&mode=debug&edition=2021&gist=01f0dcf3b636948e5c1cf8baeeedb35c
The current output is:
The same thing occurs for clippy lints:
To reiterate: the issue is that attributes for silencing warnings are ignored when placed on expressions. I realize now the first example might be an issue with higher precedence, but the second example with clippy is obviously faulty.
The text was updated successfully, but these errors were encountered: