Closed
Description
#![allow(dead_code, unused_variables)]
fn main() {
const N1: f64 = (2.0 * 2.0);
let n2: f64 = (2.0 * 2.0);
}
It doesn't give a warning for the unnecessary parentheses for N1:
warning: unnecessary parentheses around assigned value
--> ...\test.rs:4:19
|
4 | let n2: f64 = (2.0 * 2.0);
| ^^^^^^^^^^^ help: remove these parentheses
|
= note: `#[warn(unused_parens)]` on by default
This issue has been assigned to @Tyg13 via this comment.
Metadata
Metadata
Assignees
Labels
Area: Constant evaluation, covers all const contexts (static, const fn, ...)Area: Lints (warnings about flaws in source code) such as unused_mut.Category: This is a bug.Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.Call for participation: This issue has a mentor. Use #t-compiler/help on Zulip for discussion.Relevant to the compiler team, which will review and decide on the PR/issue.