Shrink PatPtr by swapping its AstPtr and Either wrap order

This commit is contained in:
Lukas Wirth 2023-10-06 12:32:37 +02:00
parent a158670432
commit 88a00bf49d
15 changed files with 164 additions and 190 deletions

View file

@ -375,10 +375,7 @@ impl MirEvalError {
Err(_) => continue,
},
MirSpan::PatId(p) => match source_map.pat_syntax(*p) {
Ok(s) => s.map(|it| match it {
Either::Left(e) => e.into(),
Either::Right(e) => e.into(),
}),
Ok(s) => s.map(|it| it.syntax_node_ptr()),
Err(_) => continue,
},
MirSpan::Unknown => continue,