diff options
| author | Oli Scherer <git-spam-no-reply9815368754983@oli-obk.de> | 2024-07-05 08:28:09 +0000 |
|---|---|---|
| committer | Oli Scherer <git-spam-no-reply9815368754983@oli-obk.de> | 2024-07-08 19:29:55 +0000 |
| commit | 2f0368c902e912242e86e49f140c666c712b79c7 (patch) | |
| tree | a14278ba251b0237311f1ecaf6e370209f8541a6 /compiler/rustc_hir_analysis/src/structured_errors.rs | |
| parent | 9e7918f70e3d8dc166034f936420a72ffb946d80 (diff) | |
| download | rust-2f0368c902e912242e86e49f140c666c712b79c7.tar.gz rust-2f0368c902e912242e86e49f140c666c712b79c7.zip | |
Remove `StructuredDiag`
Diffstat (limited to 'compiler/rustc_hir_analysis/src/structured_errors.rs')
| -rw-r--r-- | compiler/rustc_hir_analysis/src/structured_errors.rs | 29 |
1 files changed, 0 insertions, 29 deletions
diff --git a/compiler/rustc_hir_analysis/src/structured_errors.rs b/compiler/rustc_hir_analysis/src/structured_errors.rs index af4d9efca5a..1d7b0e7d64a 100644 --- a/compiler/rustc_hir_analysis/src/structured_errors.rs +++ b/compiler/rustc_hir_analysis/src/structured_errors.rs @@ -1,32 +1,3 @@ mod wrong_number_of_generic_args; pub use self::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 - } -} |
