I tried this code:
fn main(){
let a = (String::new(),0);
let ref _b = {a.0};
}
https://play.rust-lang.org/?version=nightly&mode=debug&edition=2018&gist=4b8d234e04e2d77ab45ecf3c41d59d58
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.
I tried this code:
https://play.rust-lang.org/?version=nightly&mode=debug&edition=2018&gist=4b8d234e04e2d77ab45ecf3c41d59d58
I expected the code to compile without warnings.
Instead, the
unused_braceslint was triggered:Meta
This bug happens in 1.44.0-nightly (2020-04-01 76b1198),not in Rust beta nor stable.