Auto merge of #121780 - nnethercote:diag-renaming2, r=davidtwco
Diagnostic renaming 2 A sequel to #121489. r? `@davidtwco`
This commit is contained in:
commit
1547c076bf
95 changed files with 609 additions and 639 deletions
|
@ -3,7 +3,7 @@ use crate::astconv::{
|
|||
errors::prohibit_assoc_ty_binding, CreateInstantiationsForGenericArgsCtxt, ExplicitLateBound,
|
||||
GenericArgCountMismatch, GenericArgCountResult, GenericArgPosition,
|
||||
};
|
||||
use crate::structured_errors::{GenericArgsInfo, StructuredDiagnostic, WrongNumberOfGenericArgs};
|
||||
use crate::structured_errors::{GenericArgsInfo, StructuredDiag, WrongNumberOfGenericArgs};
|
||||
use rustc_ast::ast::ParamKindOrd;
|
||||
use rustc_errors::{
|
||||
codes::*, struct_span_code_err, Applicability, Diag, ErrorGuaranteed, MultiSpan,
|
||||
|
|
|
@ -7,7 +7,7 @@ use crate::errors::{
|
|||
WrongNumberOfGenericArgumentsToIntrinsic,
|
||||
};
|
||||
|
||||
use rustc_errors::{codes::*, struct_span_code_err, DiagnosticMessage};
|
||||
use rustc_errors::{codes::*, struct_span_code_err, DiagMessage};
|
||||
use rustc_hir as hir;
|
||||
use rustc_middle::traits::{ObligationCause, ObligationCauseCode};
|
||||
use rustc_middle::ty::{self, Ty, TyCtxt};
|
||||
|
@ -139,7 +139,7 @@ pub fn intrinsic_operation_unsafety(tcx: TyCtxt<'_>, intrinsic_id: LocalDefId) -
|
|||
if has_safe_attr != is_in_list {
|
||||
tcx.dcx().struct_span_err(
|
||||
tcx.def_span(intrinsic_id),
|
||||
DiagnosticMessage::from(format!(
|
||||
DiagMessage::from(format!(
|
||||
"intrinsic safety mismatch between list of intrinsics within the compiler and core library intrinsics for intrinsic `{}`",
|
||||
tcx.item_name(intrinsic_id.into())
|
||||
)
|
||||
|
|
|
@ -9,7 +9,7 @@ pub use self::{
|
|||
use rustc_errors::{Diag, ErrCode};
|
||||
use rustc_session::Session;
|
||||
|
||||
pub trait StructuredDiagnostic<'tcx> {
|
||||
pub trait StructuredDiag<'tcx> {
|
||||
fn session(&self) -> &Session;
|
||||
|
||||
fn code(&self) -> ErrCode;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
use crate::{errors, structured_errors::StructuredDiagnostic};
|
||||
use crate::{errors, structured_errors::StructuredDiag};
|
||||
use rustc_errors::{codes::*, Diag};
|
||||
use rustc_middle::ty::{Ty, TypeVisitableExt};
|
||||
use rustc_session::Session;
|
||||
|
@ -11,7 +11,7 @@ pub struct MissingCastForVariadicArg<'tcx, 's> {
|
|||
pub cast_ty: &'s str,
|
||||
}
|
||||
|
||||
impl<'tcx> StructuredDiagnostic<'tcx> for MissingCastForVariadicArg<'tcx, '_> {
|
||||
impl<'tcx> StructuredDiag<'tcx> for MissingCastForVariadicArg<'tcx, '_> {
|
||||
fn session(&self) -> &Session {
|
||||
self.sess
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
use crate::{errors, structured_errors::StructuredDiagnostic};
|
||||
use crate::{errors, structured_errors::StructuredDiag};
|
||||
use rustc_errors::{codes::*, Diag};
|
||||
use rustc_middle::ty::{Ty, TypeVisitableExt};
|
||||
use rustc_session::Session;
|
||||
|
@ -11,7 +11,7 @@ pub struct SizedUnsizedCast<'tcx> {
|
|||
pub cast_ty: String,
|
||||
}
|
||||
|
||||
impl<'tcx> StructuredDiagnostic<'tcx> for SizedUnsizedCast<'tcx> {
|
||||
impl<'tcx> StructuredDiag<'tcx> for SizedUnsizedCast<'tcx> {
|
||||
fn session(&self) -> &Session {
|
||||
self.sess
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
use crate::structured_errors::StructuredDiagnostic;
|
||||
use crate::structured_errors::StructuredDiag;
|
||||
use rustc_errors::{codes::*, pluralize, Applicability, Diag, MultiSpan};
|
||||
use rustc_hir as hir;
|
||||
use rustc_middle::ty::{self as ty, AssocItems, AssocKind, TyCtxt};
|
||||
|
@ -1097,7 +1097,7 @@ impl<'a, 'tcx> WrongNumberOfGenericArgs<'a, 'tcx> {
|
|||
}
|
||||
}
|
||||
|
||||
impl<'tcx> StructuredDiagnostic<'tcx> for WrongNumberOfGenericArgs<'_, 'tcx> {
|
||||
impl<'tcx> StructuredDiag<'tcx> for WrongNumberOfGenericArgs<'_, 'tcx> {
|
||||
fn session(&self) -> &Session {
|
||||
self.tcx.sess
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue