internal: Treat the self param as different from patterns when lowering

This commit is contained in:
Lukas Wirth 2024-03-06 15:57:05 +01:00
parent 0931361b8f
commit 458f4a2960
18 changed files with 256 additions and 144 deletions

View file

@ -376,6 +376,10 @@ impl MirEvalError {
Ok(s) => s.map(|it| it.syntax_node_ptr()),
Err(_) => continue,
},
MirSpan::SelfParam => match source_map.self_param_syntax() {
Some(s) => s.map(|it| it.syntax_node_ptr()),
None => continue,
},
MirSpan::Unknown => continue,
};
let file_id = span.file_id.original_file(db.upcast());