about summary refs log tree commit diff
path: root/compiler/rustc_hir_analysis/src/structured_errors.rs
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2024-02-28 20:39:38 +0000
committerbors <bors@rust-lang.org>2024-02-28 20:39:38 +0000
commitc475e2303b551d726307c646181e0677af1e0069 (patch)
tree1adcfeb24550451e018fe8928319a9fa68d53314 /compiler/rustc_hir_analysis/src/structured_errors.rs
parentbf9c7a64ad222b85397573668b39e6d1ab9f4a72 (diff)
parent8f3b007abca70140d354f19ece5745d1a2c5f2b2 (diff)
downloadrust-c475e2303b551d726307c646181e0677af1e0069.tar.gz
rust-c475e2303b551d726307c646181e0677af1e0069.zip
Auto merge of #121489 - nnethercote:diag-renaming, r=davidtwco
Diagnostic renaming

Renaming various diagnostic types from `Diagnostic*` to `Diag*`. Part of https://github.com/rust-lang/compiler-team/issues/722. There are more to do but this is enough for one PR.

r? `@davidtwco`
Diffstat (limited to 'compiler/rustc_hir_analysis/src/structured_errors.rs')
-rw-r--r--compiler/rustc_hir_analysis/src/structured_errors.rs10
1 files changed, 5 insertions, 5 deletions
diff --git a/compiler/rustc_hir_analysis/src/structured_errors.rs b/compiler/rustc_hir_analysis/src/structured_errors.rs
index 6846e4defe5..9064ba8693e 100644
--- a/compiler/rustc_hir_analysis/src/structured_errors.rs
+++ b/compiler/rustc_hir_analysis/src/structured_errors.rs
@@ -6,7 +6,7 @@ pub use self::{
     missing_cast_for_variadic_arg::*, sized_unsized_cast::*, wrong_number_of_generic_args::*,
 };
 
-use rustc_errors::{DiagnosticBuilder, ErrCode};
+use rustc_errors::{Diag, ErrCode};
 use rustc_session::Session;
 
 pub trait StructuredDiagnostic<'tcx> {
@@ -14,7 +14,7 @@ pub trait StructuredDiagnostic<'tcx> {
 
     fn code(&self) -> ErrCode;
 
-    fn diagnostic(&self) -> DiagnosticBuilder<'tcx> {
+    fn diagnostic(&self) -> Diag<'tcx> {
         let err = self.diagnostic_common();
 
         if self.session().teach(self.code()) {
@@ -24,13 +24,13 @@ pub trait StructuredDiagnostic<'tcx> {
         }
     }
 
-    fn diagnostic_common(&self) -> DiagnosticBuilder<'tcx>;
+    fn diagnostic_common(&self) -> Diag<'tcx>;
 
-    fn diagnostic_regular(&self, err: DiagnosticBuilder<'tcx>) -> DiagnosticBuilder<'tcx> {
+    fn diagnostic_regular(&self, err: Diag<'tcx>) -> Diag<'tcx> {
         err
     }
 
-    fn diagnostic_extended(&self, err: DiagnosticBuilder<'tcx>) -> DiagnosticBuilder<'tcx> {
+    fn diagnostic_extended(&self, err: Diag<'tcx>) -> Diag<'tcx> {
         err
     }
 }