Closed
Description
Code
fn main() {
macro_rules! x {
() => { None::<i32> };
}
let Some(_x) = (x! {}) else { return };
}
Current output
warning: unnecessary parentheses around assigned value
--> src/main.rs:6:20
|
6 | let Some(_x) = (x! {}) else { return };
| ^ ^
|
= note: `#[warn(unused_parens)]` on by default
help: remove these parentheses
|
6 - let Some(_x) = (x! {}) else { return };
6 + let Some(_x) = x! {} else { return };
|
warning: 1 warning emitted
Desired output
nothing
Rationale and extra context
No response
Other cases
No response
Rust Version
rustc 1.83.0-nightly (6b9676b 2024-10-12)
binary: rustc
commit-hash: 6b9676b
commit-date: 2024-10-12
host: aarch64-apple-darwin
release: 1.83.0-nightly
LLVM version: 19.1.1
Anything else?
This was an issue on a nightly from 7th of August as well