]> git.lizzy.rs Git - rust.git/blobdiff - compiler/rustc_typeck/src/structured_errors.rs
Rollup merge of #93283 - m1guelperez:master, r=Mark-Simulacrum
[rust.git] / compiler / rustc_typeck / src / structured_errors.rs
index 8621375fc63e0b6a4a3d2ff94e97e5acea93a0e3..0b46fce17354996354b6a607ca412fb5d88c72b6 100644 (file)
@@ -6,7 +6,7 @@
     missing_cast_for_variadic_arg::*, sized_unsized_cast::*, wrong_number_of_generic_args::*,
 };
 
-use rustc_errors::{DiagnosticBuilder, DiagnosticId, ErrorReported};
+use rustc_errors::{DiagnosticBuilder, DiagnosticId, ErrorGuaranteed};
 use rustc_session::Session;
 
 pub trait StructuredDiagnostic<'tcx> {
@@ -14,7 +14,7 @@ pub trait StructuredDiagnostic<'tcx> {
 
     fn code(&self) -> DiagnosticId;
 
-    fn diagnostic(&self) -> DiagnosticBuilder<'tcx, ErrorReported> {
+    fn diagnostic(&self) -> DiagnosticBuilder<'tcx, ErrorGuaranteed> {
         let err = self.diagnostic_common();
 
         if self.session().teach(&self.code()) {
@@ -24,19 +24,19 @@ fn diagnostic(&self) -> DiagnosticBuilder<'tcx, ErrorReported> {
         }
     }
 
-    fn diagnostic_common(&self) -> DiagnosticBuilder<'tcx, ErrorReported>;
+    fn diagnostic_common(&self) -> DiagnosticBuilder<'tcx, ErrorGuaranteed>;
 
     fn diagnostic_regular(
         &self,
-        err: DiagnosticBuilder<'tcx, ErrorReported>,
-    ) -> DiagnosticBuilder<'tcx, ErrorReported> {
+        err: DiagnosticBuilder<'tcx, ErrorGuaranteed>,
+    ) -> DiagnosticBuilder<'tcx, ErrorGuaranteed> {
         err
     }
 
     fn diagnostic_extended(
         &self,
-        err: DiagnosticBuilder<'tcx, ErrorReported>,
-    ) -> DiagnosticBuilder<'tcx, ErrorReported> {
+        err: DiagnosticBuilder<'tcx, ErrorGuaranteed>,
+    ) -> DiagnosticBuilder<'tcx, ErrorGuaranteed> {
         err
     }
 }