diff options
Diffstat (limited to 'crates/ra_hir/src/lib.rs')
-rw-r--r-- | crates/ra_hir/src/lib.rs | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/crates/ra_hir/src/lib.rs b/crates/ra_hir/src/lib.rs index 760524f6b..80354a49d 100644 --- a/crates/ra_hir/src/lib.rs +++ b/crates/ra_hir/src/lib.rs | |||
@@ -143,11 +143,14 @@ impl SourceFileItems { | |||
143 | return id; | 143 | return id; |
144 | } | 144 | } |
145 | // This should not happen. Let's try to give a sensible diagnostics. | 145 | // This should not happen. Let's try to give a sensible diagnostics. |
146 | if let Some((_, i)) = self.arena.iter().find(|(_id, i)| i.range() == item.range()) { | 146 | if let Some((id, i)) = self.arena.iter().find(|(_id, i)| i.range() == item.range()) { |
147 | panic!( | 147 | // FIXME(#288): whyyy are we getting here? |
148 | log::error!( | ||
148 | "unequal syntax nodes with the same range:\n{:?}\n{:?}", | 149 | "unequal syntax nodes with the same range:\n{:?}\n{:?}", |
149 | item, i | 150 | item, |
150 | ) | 151 | i |
152 | ); | ||
153 | return id; | ||
151 | } | 154 | } |
152 | panic!( | 155 | panic!( |
153 | "Can't find {:?} in SourceFileItems:\n{:?}", | 156 | "Can't find {:?} in SourceFileItems:\n{:?}", |