about summary refs log tree commit diff
path: root/compiler/rustc_parse/src/parser/expr.rs
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2022-03-02 16:13:38 +0000
committerbors <bors@rust-lang.org>2022-03-02 16:13:38 +0000
commit08504c64aa7c4163a51c1982ed10075bb89cec0e (patch)
treed2c3743151e614831817cb8c27487a820826cc29 /compiler/rustc_parse/src/parser/expr.rs
parentc42d846add941a26bd254911e16f02c4a3f9346f (diff)
parente489a94deef3d41513fe4254804d730f0fd6cbc0 (diff)
downloadrust-08504c64aa7c4163a51c1982ed10075bb89cec0e.tar.gz
rust-08504c64aa7c4163a51c1982ed10075bb89cec0e.zip
Auto merge of #93244 - mark-i-m:doomed, r=oli-obk
Rename `ErrorReported` -> `ErrorGuaranteed`

r? `@eddyb`

cc https://github.com/rust-lang/rust/pull/93222 https://github.com/rust-lang/rust/issues/69426

The idea is that we would like to use it for both errors and `delay_span_bug`. Its semantics indicate a _guarantee_ that compilation will fail.
Diffstat (limited to 'compiler/rustc_parse/src/parser/expr.rs')
-rw-r--r--compiler/rustc_parse/src/parser/expr.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/compiler/rustc_parse/src/parser/expr.rs b/compiler/rustc_parse/src/parser/expr.rs
index a54ab4a92e1..df865d77b9b 100644
--- a/compiler/rustc_parse/src/parser/expr.rs
+++ b/compiler/rustc_parse/src/parser/expr.rs
@@ -17,7 +17,7 @@ use rustc_ast::{self as ast, AttrStyle, AttrVec, CaptureBy, ExprField, Lit, UnOp
 use rustc_ast::{AnonConst, BinOp, BinOpKind, FnDecl, FnRetTy, MacCall, Param, Ty, TyKind};
 use rustc_ast::{Arm, Async, BlockCheckMode, Expr, ExprKind, Label, Movability, RangeLimits};
 use rustc_ast_pretty::pprust;
-use rustc_errors::{Applicability, Diagnostic, DiagnosticBuilder, ErrorReported, PResult};
+use rustc_errors::{Applicability, Diagnostic, DiagnosticBuilder, ErrorGuaranteed, PResult};
 use rustc_session::lint::builtin::BREAK_WITH_LABEL_AND_LOOP;
 use rustc_session::lint::BuiltinLintDiagnostics;
 use rustc_span::edition::LATEST_STABLE_EDITION;
@@ -2126,9 +2126,9 @@ impl<'a> Parser<'a> {
     fn error_missing_if_then_block(
         &self,
         if_span: Span,
-        err: Option<DiagnosticBuilder<'a, ErrorReported>>,
+        err: Option<DiagnosticBuilder<'a, ErrorGuaranteed>>,
         binop_span: Option<Span>,
-    ) -> DiagnosticBuilder<'a, ErrorReported> {
+    ) -> DiagnosticBuilder<'a, ErrorGuaranteed> {
         let msg = "this `if` expression has a condition, but no block";
 
         let mut err = if let Some(mut err) = err {