-
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.
Description
The following code produces an unused_assignment
warning (playground):
fn main() {
let mut done = false;
while !done {
done = true;
continue;
}
}
warning: value assigned to `done` is never read
--> src/main.rs:4:9
|
4 | done = true;
| ^^^^
|
= note: #[warn(unused_assignments)] on by default
kanerogers and ataias
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.