don't trigger blocks_in_conditions when the condition contains a return
This commit is contained in:
parent
1419ac2982
commit
243e0ee274
3 changed files with 22 additions and 1 deletions
|
|
@ -118,6 +118,13 @@ mod issue_12016 {
|
|||
}
|
||||
}
|
||||
|
||||
fn issue_9911() {
|
||||
if { return } {}
|
||||
|
||||
let a = 1;
|
||||
if { if a == 1 { return } else { true } } {}
|
||||
}
|
||||
|
||||
fn in_closure() {
|
||||
let v = vec![1, 2, 3];
|
||||
if v.into_iter()
|
||||
|
|
|
|||
|
|
@ -118,6 +118,13 @@ mod issue_12016 {
|
|||
}
|
||||
}
|
||||
|
||||
fn issue_9911() {
|
||||
if { return } {}
|
||||
|
||||
let a = 1;
|
||||
if { if a == 1 { return } else { true } } {}
|
||||
}
|
||||
|
||||
fn in_closure() {
|
||||
let v = vec![1, 2, 3];
|
||||
if v.into_iter()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue