Use if-let guards in the codebase
This commit is contained in:
@@ -225,14 +225,12 @@ impl<'tcx> TyCtxt<'tcx> {
|
||||
}
|
||||
}
|
||||
|
||||
ty::Tuple(tys) => {
|
||||
if let Some((&last_ty, _)) = tys.split_last() {
|
||||
ty = last_ty.expect_ty();
|
||||
} else {
|
||||
break;
|
||||
}
|
||||
ty::Tuple(tys) if let Some((&last_ty, _)) = tys.split_last() => {
|
||||
ty = last_ty.expect_ty();
|
||||
}
|
||||
|
||||
ty::Tuple(_) => break,
|
||||
|
||||
ty::Projection(_) | ty::Opaque(..) => {
|
||||
let normalized = normalize(ty);
|
||||
if ty == normalized {
|
||||
|
||||
Reference in New Issue
Block a user