diff options
| author | Nicholas Nethercote <n.nethercote@gmail.com> | 2024-03-06 11:02:56 +1100 |
|---|---|---|
| committer | Nicholas Nethercote <n.nethercote@gmail.com> | 2024-03-11 09:15:09 +1100 |
| commit | 7a294e998b66ea6d410a6840cba80347fc4764c2 (patch) | |
| tree | aa7a68bfbbb9177a06cda144baca657f4939996b /compiler/rustc_parse/src | |
| parent | a09b1d33a703d4ed412e70d3197e73ba7e0937f9 (diff) | |
| download | rust-7a294e998b66ea6d410a6840cba80347fc4764c2.tar.gz rust-7a294e998b66ea6d410a6840cba80347fc4764c2.zip | |
Rename `IntoDiagnostic` as `Diagnostic`.
To match `derive(Diagnostic)`. Also rename `into_diagnostic` as `into_diag`.
Diffstat (limited to 'compiler/rustc_parse/src')
| -rw-r--r-- | compiler/rustc_parse/src/errors.rs | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/compiler/rustc_parse/src/errors.rs b/compiler/rustc_parse/src/errors.rs index c72b7e2cfa7..394e4106c91 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::{ - codes::*, AddToDiagnostic, Applicability, Diag, DiagCtxt, EmissionGuarantee, IntoDiagnostic, - Level, SubdiagMessageOp, + codes::*, AddToDiagnostic, Applicability, Diag, DiagCtxt, Diagnostic, EmissionGuarantee, Level, + SubdiagMessageOp, }; use rustc_macros::{Diagnostic, Subdiagnostic}; use rustc_session::errors::ExprParenthesesNeeded; @@ -1065,9 +1065,9 @@ pub(crate) struct ExpectedIdentifier { pub help_cannot_start_number: Option<HelpIdentifierStartsWithNumber>, } -impl<'a, G: EmissionGuarantee> IntoDiagnostic<'a, G> for ExpectedIdentifier { +impl<'a, G: EmissionGuarantee> Diagnostic<'a, G> for ExpectedIdentifier { #[track_caller] - fn into_diagnostic(self, dcx: &'a DiagCtxt, level: Level) -> Diag<'a, G> { + fn into_diag(self, dcx: &'a DiagCtxt, level: Level) -> Diag<'a, G> { let token_descr = TokenDescription::from_token(&self.token); let mut diag = Diag::new( @@ -1125,9 +1125,9 @@ pub(crate) struct ExpectedSemi { pub sugg: ExpectedSemiSugg, } -impl<'a, G: EmissionGuarantee> IntoDiagnostic<'a, G> for ExpectedSemi { +impl<'a, G: EmissionGuarantee> Diagnostic<'a, G> for ExpectedSemi { #[track_caller] - fn into_diagnostic(self, dcx: &'a DiagCtxt, level: Level) -> Diag<'a, G> { + fn into_diag(self, dcx: &'a DiagCtxt, level: Level) -> Diag<'a, G> { let token_descr = TokenDescription::from_token(&self.token); let mut diag = Diag::new( |
