Change fatal diagnostic to an error.
Co-authored-by: Esteban Kuber <estebank@users.noreply.github.com>
This commit is contained in:
parent
e89d4fcc7d
commit
79d4f09942
1 changed files with 7 additions and 1 deletions
|
@ -1264,7 +1264,13 @@ impl<'hir> LoweringContext<'_, 'hir> {
|
||||||
(Some(..), Some(..), HalfOpen) => hir::LangItem::Range,
|
(Some(..), Some(..), HalfOpen) => hir::LangItem::Range,
|
||||||
(None, Some(..), Closed) => hir::LangItem::RangeToInclusive,
|
(None, Some(..), Closed) => hir::LangItem::RangeToInclusive,
|
||||||
(Some(..), Some(..), Closed) => unreachable!(),
|
(Some(..), Some(..), Closed) => unreachable!(),
|
||||||
(_, None, Closed) => self.tcx.sess.emit_fatal(InclusiveRangeWithNoEnd { span }),
|
(start, None, Closed) => {
|
||||||
|
self.tcx.sess.emit_err(InclusiveRangeWithNoEnd { span });
|
||||||
|
match start {
|
||||||
|
Some(..) => hir::LangItem::RangeFrom,
|
||||||
|
None => hir::LangItem::RangeFull,
|
||||||
|
}
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
let fields = self.arena.alloc_from_iter(
|
let fields = self.arena.alloc_from_iter(
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue