diff options
| author | The Miri Conjob Bot <miri@cron.bot> | 2023-12-24 05:00:43 +0000 |
|---|---|---|
| committer | The Miri Conjob Bot <miri@cron.bot> | 2023-12-24 05:00:43 +0000 |
| commit | 29f25ee3f381922b39a67089bb07d70bfbe2f17e (patch) | |
| tree | b3d97623b0f43b549734a6730ef55f0adf29dbea /compiler/rustc_hir_analysis/src/structured_errors.rs | |
| parent | f3db65df94bf9a086837f979b06de2c966125c07 (diff) | |
| parent | c350d3c5dd00ed0727ffe72fc33637d8c7537733 (diff) | |
| download | rust-29f25ee3f381922b39a67089bb07d70bfbe2f17e.tar.gz rust-29f25ee3f381922b39a67089bb07d70bfbe2f17e.zip | |
Merge from rustc
Diffstat (limited to 'compiler/rustc_hir_analysis/src/structured_errors.rs')
| -rw-r--r-- | compiler/rustc_hir_analysis/src/structured_errors.rs | 16 |
1 files changed, 5 insertions, 11 deletions
diff --git a/compiler/rustc_hir_analysis/src/structured_errors.rs b/compiler/rustc_hir_analysis/src/structured_errors.rs index 0b46fce1735..04d04304e70 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, DiagnosticId, ErrorGuaranteed}; +use rustc_errors::{DiagnosticBuilder, DiagnosticId}; 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, ErrorGuaranteed> { + fn diagnostic(&self) -> DiagnosticBuilder<'tcx> { let err = self.diagnostic_common(); if self.session().teach(&self.code()) { @@ -24,19 +24,13 @@ pub trait StructuredDiagnostic<'tcx> { } } - fn diagnostic_common(&self) -> DiagnosticBuilder<'tcx, ErrorGuaranteed>; + fn diagnostic_common(&self) -> DiagnosticBuilder<'tcx>; - fn diagnostic_regular( - &self, - err: DiagnosticBuilder<'tcx, ErrorGuaranteed>, - ) -> DiagnosticBuilder<'tcx, ErrorGuaranteed> { + fn diagnostic_regular(&self, err: DiagnosticBuilder<'tcx>) -> DiagnosticBuilder<'tcx> { err } - fn diagnostic_extended( - &self, - err: DiagnosticBuilder<'tcx, ErrorGuaranteed>, - ) -> DiagnosticBuilder<'tcx, ErrorGuaranteed> { + fn diagnostic_extended(&self, err: DiagnosticBuilder<'tcx>) -> DiagnosticBuilder<'tcx> { err } } |
