fix: collapsible_if FP on block stmt before expr
This commit is contained in:
parent
50e0bf1b71
commit
e7acf5c9b9
3 changed files with 29 additions and 8 deletions
|
|
@ -143,3 +143,14 @@ fn layout_check() -> u32 {
|
|||
; 3
|
||||
//~^^^^^ collapsible_if
|
||||
}
|
||||
|
||||
fn issue14722() {
|
||||
let x = if true {
|
||||
Some(1)
|
||||
} else {
|
||||
if true {
|
||||
println!("Some debug information");
|
||||
};
|
||||
None
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -153,3 +153,14 @@ fn layout_check() -> u32 {
|
|||
}; 3
|
||||
//~^^^^^ collapsible_if
|
||||
}
|
||||
|
||||
fn issue14722() {
|
||||
let x = if true {
|
||||
Some(1)
|
||||
} else {
|
||||
if true {
|
||||
println!("Some debug information");
|
||||
};
|
||||
None
|
||||
};
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue