mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-02 06:41:48 +00:00
internal: Shrink size of Binding
This commit is contained in:
parent
36f58f5fff
commit
7c374a10bd
15 changed files with 94 additions and 56 deletions
|
@ -388,6 +388,16 @@ impl MirEvalError {
|
|||
Ok(s) => s.map(|it| it.syntax_node_ptr()),
|
||||
Err(_) => continue,
|
||||
},
|
||||
MirSpan::BindingId(b) => {
|
||||
match source_map
|
||||
.patterns_for_binding(*b)
|
||||
.iter()
|
||||
.find_map(|p| source_map.pat_syntax(*p).ok())
|
||||
{
|
||||
Some(s) => s.map(|it| it.syntax_node_ptr()),
|
||||
None => continue,
|
||||
}
|
||||
}
|
||||
MirSpan::SelfParam => match source_map.self_param_syntax() {
|
||||
Some(s) => s.map(|it| it.syntax_node_ptr()),
|
||||
None => continue,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue