don't lint unused_parens on if (break _)
This commit is contained in:
parent
4e88b7363b
commit
1a37575ade
2 changed files with 12 additions and 4 deletions
|
|
@ -23,4 +23,13 @@ fn main() {
|
|||
// We want to suggest the properly-balanced expression `1 / (2 + 3)`, not
|
||||
// the malformed `1 / (2 + 3`
|
||||
let _a = (1 / (2 + 3));
|
||||
f();
|
||||
}
|
||||
|
||||
fn f() -> bool {
|
||||
loop {
|
||||
if (break { return true }) {
|
||||
}
|
||||
}
|
||||
false
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue