parent_node_is_if_expr now also recognizes if let as parent if
This commit is contained in:
parent
b1c675f3fc
commit
cbde4f2c67
3 changed files with 44 additions and 7 deletions
|
|
@ -206,4 +206,18 @@ fn fp_test() {
|
|||
}
|
||||
}
|
||||
|
||||
fn fp_if_let_issue7054() {
|
||||
// This shouldn't trigger the lint
|
||||
let string;
|
||||
let _x = if let true = true {
|
||||
""
|
||||
} else if true {
|
||||
string = "x".to_owned();
|
||||
&string
|
||||
} else {
|
||||
string = "y".to_owned();
|
||||
&string
|
||||
};
|
||||
}
|
||||
|
||||
fn main() {}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue