mirror of https://github.com/rust-lang/rust.git
parent
f3ea21ac16
commit
d05790b947
|
@ -143,11 +143,14 @@ impl SourceFileItems {
|
||||||
return id;
|
return id;
|
||||||
}
|
}
|
||||||
// This should not happen. Let's try to give a sensible diagnostics.
|
// This should not happen. Let's try to give a sensible diagnostics.
|
||||||
if let Some((_, i)) = self.arena.iter().find(|(_id, i)| i.range() == item.range()) {
|
if let Some((id, i)) = self.arena.iter().find(|(_id, i)| i.range() == item.range()) {
|
||||||
panic!(
|
// FIXME(#288): whyyy are we getting here?
|
||||||
|
log::error!(
|
||||||
"unequal syntax nodes with the same range:\n{:?}\n{:?}",
|
"unequal syntax nodes with the same range:\n{:?}\n{:?}",
|
||||||
item, i
|
item,
|
||||||
)
|
i
|
||||||
|
);
|
||||||
|
return id;
|
||||||
}
|
}
|
||||||
panic!(
|
panic!(
|
||||||
"Can't find {:?} in SourceFileItems:\n{:?}",
|
"Can't find {:?} in SourceFileItems:\n{:?}",
|
||||||
|
|
Loading…
Reference in New Issue