-
Notifications
You must be signed in to change notification settings - Fork 13.6k
Closed
Labels
A-lintsArea: Lints (warnings about flaws in source code) such as unused_mut.Area: Lints (warnings about flaws in source code) such as unused_mut.C-bugCategory: This is a bug.Category: This is a bug.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.
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.
shepmaster and 197g
Metadata
Metadata
Assignees
Labels
A-lintsArea: Lints (warnings about flaws in source code) such as unused_mut.Area: Lints (warnings about flaws in source code) such as unused_mut.C-bugCategory: This is a bug.Category: This is a bug.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.