diff options
| author | Jean CASPAR <55629512+JeanCASPAR@users.noreply.github.com> | 2022-08-26 18:03:41 +0200 |
|---|---|---|
| committer | Jean CASPAR <55629512+JeanCASPAR@users.noreply.github.com> | 2022-08-27 09:15:55 +0200 |
| commit | e89d4fcc7d99bcf76464d9c0994d54d12e00dfb7 (patch) | |
| tree | a6143f99933e54b43c6aeac889524b28090adb3b /compiler/rustc_ast_lowering/src/expr.rs | |
| parent | 9845f4c47e7062867c73b6bed8f1df273b56d5d7 (diff) | |
| download | rust-e89d4fcc7d99bcf76464d9c0994d54d12e00dfb7.tar.gz rust-e89d4fcc7d99bcf76464d9c0994d54d12e00dfb7.zip | |
remove span_fatal from ast_lowering
Diffstat (limited to 'compiler/rustc_ast_lowering/src/expr.rs')
| -rw-r--r-- | compiler/rustc_ast_lowering/src/expr.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/compiler/rustc_ast_lowering/src/expr.rs b/compiler/rustc_ast_lowering/src/expr.rs index 61f8c0216f1..6d8ce62d913 100644 --- a/compiler/rustc_ast_lowering/src/expr.rs +++ b/compiler/rustc_ast_lowering/src/expr.rs @@ -1,8 +1,8 @@ use super::errors::{ AsyncGeneratorsNotSupported, AsyncNonMoveClosureNotSupported, AwaitOnlyInAsyncFnAndBlocks, BaseExpressionDoubleDot, ClosureCannotBeStatic, FunctionalRecordUpdateDestructuringAssignemnt, - GeneratorTooManyParameters, NotSupportedForLifetimeBinderAsyncClosure, RustcBoxAttributeError, - UnderscoreExprLhsAssign, + GeneratorTooManyParameters, InclusiveRangeWithNoEnd, NotSupportedForLifetimeBinderAsyncClosure, + RustcBoxAttributeError, UnderscoreExprLhsAssign, }; use super::ResolverAstLoweringExt; use super::{ImplTraitContext, LoweringContext, ParamMode, ParenthesizedGenericArgs}; @@ -1264,7 +1264,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"), + (_, None, Closed) => self.tcx.sess.emit_fatal(InclusiveRangeWithNoEnd { span }), }; let fields = self.arena.alloc_from_iter( |
