Closed
Description
I tried this code:
fn main(){
let a = (String::new(),0);
let ref _b = {a.0};
}
I expected the code to compile without warnings.
Instead, the unused_braces
lint was triggered:
warning: unnecessary braces around assigned value
--> src/main.rs:4:18
|
4 | let ref _b = {a.0};
| ^^^^^ help: remove these braces
|
= note: `#[warn(unused_braces)]` on by default
Meta
This bug happens in 1.44.0-nightly (2020-04-01 76b1198),not in Rust beta nor stable.