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
|
@ -449,11 +449,7 @@ pub trait Emitter {
|
|||
span: &mut MultiSpan,
|
||||
children: &mut Vec<SubDiagnostic>,
|
||||
) {
|
||||
let source_map = if let Some(ref sm) = source_map {
|
||||
sm
|
||||
} else {
|
||||
return;
|
||||
};
|
||||
let Some(source_map) = source_map else { return };
|
||||
debug!("fix_multispans_in_extern_macros: before: span={:?} children={:?}", span, children);
|
||||
self.fix_multispan_in_extern_macros(source_map, span);
|
||||
for child in children.iter_mut() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue