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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user