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
|
@ -644,9 +644,7 @@ pub fn print_query_stack<CTX: QueryContext>(
|
|||
if Some(i) == num_frames {
|
||||
break;
|
||||
}
|
||||
let query_info = if let Some(info) = query_map.as_ref().and_then(|map| map.get(&query)) {
|
||||
info
|
||||
} else {
|
||||
let Some(query_info) = query_map.as_ref().and_then(|map| map.get(&query)) else {
|
||||
break;
|
||||
};
|
||||
let mut diag = Diagnostic::new(
|
||||
|
|
|
@ -761,11 +761,9 @@ where
|
|||
return false;
|
||||
}
|
||||
|
||||
let key = if let Some(key) =
|
||||
let Some(key) =
|
||||
<Q::Key as DepNodeParams<CTX::DepContext>>::recover(*tcx.dep_context(), &dep_node)
|
||||
{
|
||||
key
|
||||
} else {
|
||||
else {
|
||||
return false;
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue