Adopt let_else across the compiler
This performs a substitution of code following the pattern: let <id> = if let <pat> = ... { identity } else { ... : ! }; To simplify it to: let <pat> = ... { identity } else { ... : ! }; By adopting the let_else feature.
This commit is contained in:
parent
c1026539bd
commit
1418df5888
51 changed files with 69 additions and 137 deletions
|
@ -122,9 +122,7 @@ impl Qualif for NeedsNonConstDrop {
|
|||
Ok([..]) => {}
|
||||
}
|
||||
|
||||
let drop_trait = if let Some(did) = cx.tcx.lang_items().drop_trait() {
|
||||
did
|
||||
} else {
|
||||
let Some(drop_trait) = cx.tcx.lang_items().drop_trait() else {
|
||||
// there is no way to define a type that needs non-const drop
|
||||
// without having the lang item present.
|
||||
return false;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue