Rename IntoDiagnostic
as Diagnostic
.
To match `derive(Diagnostic)`. Also rename `into_diagnostic` as `into_diag`.
This commit is contained in:
parent
a09b1d33a7
commit
7a294e998b
28 changed files with 146 additions and 164 deletions
|
@ -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(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue