Make Diagnostic::span_fatal
unconditionally raise an error
It had no callers which didn't immediately call `raise()`, and this unifies the behavior with `Session`.
This commit is contained in:
parent
e49f4471aa
commit
96509b4835
5 changed files with 13 additions and 19 deletions
|
@ -1236,9 +1236,7 @@ impl<'hir> LoweringContext<'_, 'hir> {
|
|||
(Some(..), Some(..), HalfOpen) => hir::LangItem::Range,
|
||||
(None, Some(..), Closed) => hir::LangItem::RangeToInclusive,
|
||||
(Some(..), Some(..), Closed) => unreachable!(),
|
||||
(_, None, Closed) => {
|
||||
self.diagnostic().span_fatal(span, "inclusive range with no end").raise()
|
||||
}
|
||||
(_, None, Closed) => self.diagnostic().span_fatal(span, "inclusive range with no end"),
|
||||
};
|
||||
|
||||
let fields = self.arena.alloc_from_iter(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue