don't trigger blocks_in_conditions when the condition contains a return

This commit is contained in:
lapla-cogito 2025-03-02 22:24:43 +09:00
parent 1419ac2982
commit 243e0ee274
No known key found for this signature in database
GPG key ID: B39C71D9F127FF9F
3 changed files with 22 additions and 1 deletions

View file

@ -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()

View file

@ -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()