mirror of
https://github.com/rust-lang/rust-analyzer
synced 2024-12-26 21:13:37 +00:00
internal: log original syntax on panic
This commit is contained in:
parent
f0f26053ab
commit
e5c656d804
1 changed files with 2 additions and 1 deletions
|
@ -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…
Reference in a new issue