mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-28 04:44:57 +00:00
fix: Simplify macro statement expansion handling
This commit is contained in:
parent
f8c416e1b9
commit
531e152390
10 changed files with 155 additions and 110 deletions
|
@ -2223,6 +2223,7 @@ impl Local {
|
|||
let src = source_map.pat_syntax(self.pat_id).unwrap(); // Hmm...
|
||||
let root = src.file_syntax(db.upcast());
|
||||
src.map(|ast| match ast {
|
||||
// Suspicious unwrap
|
||||
Either::Left(it) => Either::Left(it.cast().unwrap().to_node(&root)),
|
||||
Either::Right(it) => Either::Right(it.to_node(&root)),
|
||||
})
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue