mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-28 12:54:58 +00:00
Handle macro-generated expressions slightly less wrong
This commit is contained in:
parent
a73b7bb3f6
commit
da2ca01eba
6 changed files with 62 additions and 48 deletions
|
@ -145,7 +145,8 @@ impl Local {
|
|||
Some(res)
|
||||
})?;
|
||||
let (_body, source_map) = db.body_with_source_map(parent);
|
||||
let pat_id = source_map.node_pat(&src.ast.into())?;
|
||||
let src = src.map(ast::Pat::from);
|
||||
let pat_id = source_map.node_pat(src.as_ref())?;
|
||||
Some(Local { parent, pat_id })
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue