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:
@@ -716,9 +716,7 @@ impl<'cx, 'tcx> SelectionContext<'cx, 'tcx> {
|
||||
cause.clone(),
|
||||
);
|
||||
|
||||
let data = if let ty::Dynamic(ref data, ..) = normalized_ty.kind() {
|
||||
data
|
||||
} else {
|
||||
let ty::Dynamic(data, ..) = normalized_ty.kind() else {
|
||||
return None;
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user