about summary refs log tree commit diff
path: root/compiler/rustc_hir_analysis/src/structured_errors.rs
diff options
context:
space:
mode:
Diffstat (limited to 'compiler/rustc_hir_analysis/src/structured_errors.rs')
-rw-r--r--compiler/rustc_hir_analysis/src/structured_errors.rs33
1 files changed, 0 insertions, 33 deletions
diff --git a/compiler/rustc_hir_analysis/src/structured_errors.rs b/compiler/rustc_hir_analysis/src/structured_errors.rs
deleted file mode 100644
index 61a2400f9e4..00000000000
--- a/compiler/rustc_hir_analysis/src/structured_errors.rs
+++ /dev/null
@@ -1,33 +0,0 @@
-mod missing_cast_for_variadic_arg;
-mod wrong_number_of_generic_args;
-
-pub use self::{missing_cast_for_variadic_arg::*, wrong_number_of_generic_args::*};
-
-use rustc_errors::{Diag, ErrCode};
-use rustc_session::Session;
-
-pub trait StructuredDiag<'tcx> {
-    fn session(&self) -> &Session;
-
-    fn code(&self) -> ErrCode;
-
-    fn diagnostic(&self) -> Diag<'tcx> {
-        let err = self.diagnostic_common();
-
-        if self.session().teach(self.code()) {
-            self.diagnostic_extended(err)
-        } else {
-            self.diagnostic_regular(err)
-        }
-    }
-
-    fn diagnostic_common(&self) -> Diag<'tcx>;
-
-    fn diagnostic_regular(&self, err: Diag<'tcx>) -> Diag<'tcx> {
-        err
-    }
-
-    fn diagnostic_extended(&self, err: Diag<'tcx>) -> Diag<'tcx> {
-        err
-    }
-}