mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-22 14:55:26 +00:00
Rename StructuredDiagnostic
as StructuredDiag
.
This commit is contained in:
parent
7aa0eea19c
commit
f8429390ec
@ -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,
|
||||
|
@ -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
|
||||
}
|
||||
|
@ -483,9 +483,7 @@ impl<'a, 'tcx> CastCheck<'tcx> {
|
||||
err.emit();
|
||||
}
|
||||
CastError::SizedUnsizedCast => {
|
||||
use rustc_hir_analysis::structured_errors::{
|
||||
SizedUnsizedCast, StructuredDiagnostic,
|
||||
};
|
||||
use rustc_hir_analysis::structured_errors::{SizedUnsizedCast, StructuredDiag};
|
||||
|
||||
SizedUnsizedCast {
|
||||
sess: fcx.tcx.sess,
|
||||
|
@ -27,7 +27,7 @@ use rustc_hir::{ExprKind, Node, QPath};
|
||||
use rustc_hir_analysis::astconv::AstConv;
|
||||
use rustc_hir_analysis::check::intrinsicck::InlineAsmCtxt;
|
||||
use rustc_hir_analysis::check::potentially_plural_count;
|
||||
use rustc_hir_analysis::structured_errors::StructuredDiagnostic;
|
||||
use rustc_hir_analysis::structured_errors::StructuredDiag;
|
||||
use rustc_index::IndexVec;
|
||||
use rustc_infer::infer::error_reporting::{FailureCode, ObligationCauseExt};
|
||||
use rustc_infer::infer::type_variable::{TypeVariableOrigin, TypeVariableOriginKind};
|
||||
|
Loading…
Reference in New Issue
Block a user