summary refs log tree commit diff
path: root/compiler/rustc_ast_lowering/src/expr.rs
diff options
context:
space:
mode:
authorJoshua Nelson <jyn514@gmail.com>2021-03-27 22:45:01 -0400
committerJoshua Nelson <jyn514@gmail.com>2021-05-08 23:12:04 -0400
commit96509b483589e8d9ae98d1c075dccef184c8be30 (patch)
tree22249599d4466b69465b52c1d4d3720170f036e7 /compiler/rustc_ast_lowering/src/expr.rs
parente49f4471aaead4317359a21d4913965f176782a6 (diff)
downloadrust-96509b483589e8d9ae98d1c075dccef184c8be30.tar.gz
rust-96509b483589e8d9ae98d1c075dccef184c8be30.zip
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`.
Diffstat (limited to 'compiler/rustc_ast_lowering/src/expr.rs')
-rw-r--r--compiler/rustc_ast_lowering/src/expr.rs4
1 files changed, 1 insertions, 3 deletions
diff --git a/compiler/rustc_ast_lowering/src/expr.rs b/compiler/rustc_ast_lowering/src/expr.rs
index bf70a41fd79..ea0770daf0e 100644
--- a/compiler/rustc_ast_lowering/src/expr.rs
+++ b/compiler/rustc_ast_lowering/src/expr.rs
@@ -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(