diff options
| author | Michael Goulet <michael@errs.io> | 2023-12-22 21:41:03 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-12-22 21:41:03 -0500 |
| commit | e0d7a72c46d554cb63a1f91a523bfc9e6e37d886 (patch) | |
| tree | fc591e9de6b3b6689bac8f3355a0c5db2537b675 /compiler/rustc_parse/src/errors.rs | |
| parent | 7dd095598badf3328877ab31039ade0e31b09c3a (diff) | |
| parent | 2cd14bc9394ca6675e08d02c02c5f9abfa813616 (diff) | |
| download | rust-e0d7a72c46d554cb63a1f91a523bfc9e6e37d886.tar.gz rust-e0d7a72c46d554cb63a1f91a523bfc9e6e37d886.zip | |
Rollup merge of #119171 - nnethercote:cleanup-errors-4, r=compiler-errors
Cleanup error handlers: round 4 More `rustc_errors` cleanups. A sequel to #118933. r? `@compiler-errors`
Diffstat (limited to 'compiler/rustc_parse/src/errors.rs')
| -rw-r--r-- | compiler/rustc_parse/src/errors.rs | 16 |
1 files changed, 4 insertions, 12 deletions
diff --git a/compiler/rustc_parse/src/errors.rs b/compiler/rustc_parse/src/errors.rs index 8ccfcb625a6..53cce9e2883 100644 --- a/compiler/rustc_parse/src/errors.rs +++ b/compiler/rustc_parse/src/errors.rs @@ -3,8 +3,8 @@ use std::borrow::Cow; use rustc_ast::token::Token; use rustc_ast::{Path, Visibility}; use rustc_errors::{ - AddToDiagnostic, Applicability, DiagCtxt, DiagnosticBuilder, ErrorGuaranteed, IntoDiagnostic, - Level, SubdiagnosticMessage, + AddToDiagnostic, Applicability, DiagCtxt, DiagnosticBuilder, IntoDiagnostic, Level, + SubdiagnosticMessage, }; use rustc_macros::{Diagnostic, Subdiagnostic}; use rustc_session::errors::ExprParenthesesNeeded; @@ -1043,11 +1043,7 @@ pub(crate) struct ExpectedIdentifier { impl<'a> IntoDiagnostic<'a> for ExpectedIdentifier { #[track_caller] - fn into_diagnostic( - self, - dcx: &'a DiagCtxt, - level: Level, - ) -> DiagnosticBuilder<'a, ErrorGuaranteed> { + fn into_diagnostic(self, dcx: &'a DiagCtxt, level: Level) -> DiagnosticBuilder<'a> { let token_descr = TokenDescription::from_token(&self.token); let mut diag = DiagnosticBuilder::new( @@ -1107,11 +1103,7 @@ pub(crate) struct ExpectedSemi { impl<'a> IntoDiagnostic<'a> for ExpectedSemi { #[track_caller] - fn into_diagnostic( - self, - dcx: &'a DiagCtxt, - level: Level, - ) -> DiagnosticBuilder<'a, ErrorGuaranteed> { + fn into_diagnostic(self, dcx: &'a DiagCtxt, level: Level) -> DiagnosticBuilder<'a> { let token_descr = TokenDescription::from_token(&self.token); let mut diag = DiagnosticBuilder::new( |
