mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-28 11:20:54 +00:00
Merge pull request #18391 from davidbarsky/david/log-syntax-on-panic
internal: log original syntax on panic
This commit is contained in:
commit
49e85de1eb
@ -224,9 +224,10 @@ impl AstIdMap {
|
||||
match self.map.raw_entry().from_hash(hash, |&idx| self.arena[idx] == ptr) {
|
||||
Some((&idx, &())) => ErasedFileAstId(idx.into_raw().into_u32()),
|
||||
None => panic!(
|
||||
"Can't find {:?} in AstIdMap:\n{:?}",
|
||||
"Can't find {:?} in AstIdMap:\n{:?}\n source text: {}",
|
||||
item,
|
||||
self.arena.iter().map(|(_id, i)| i).collect::<Vec<_>>(),
|
||||
item
|
||||
),
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user