@@ -2,10 +2,7 @@ use std::cmp;
22
33use rustc_data_structures:: fx:: FxHashMap ;
44use rustc_data_structures:: stable_hasher:: { HashStable , StableHasher } ;
5- use rustc_errors:: {
6- Diagnostic , DiagnosticBuilder , DiagnosticId , DiagnosticMessage , EmissionGuarantee ,
7- ErrorGuaranteed , MultiSpan ,
8- } ;
5+ use rustc_errors:: { Diagnostic , DiagnosticId , LintDiagnosticBuilder , MultiSpan } ;
96use rustc_hir:: HirId ;
107use rustc_index:: vec:: IndexVec ;
118use rustc_query_system:: ich:: StableHashingContext ;
@@ -228,28 +225,6 @@ impl LintExpectation {
228225 }
229226}
230227
231- pub struct LintDiagnosticBuilder < ' a , G : EmissionGuarantee > ( DiagnosticBuilder < ' a , G > ) ;
232-
233- impl < ' a , G : EmissionGuarantee > LintDiagnosticBuilder < ' a , G > {
234- /// Return the inner `DiagnosticBuilder`, first setting the primary message to `msg`.
235- pub fn build ( mut self , msg : impl Into < DiagnosticMessage > ) -> DiagnosticBuilder < ' a , G > {
236- self . 0 . set_primary_message ( msg) ;
237- self . 0 . set_is_lint ( ) ;
238- self . 0
239- }
240-
241- /// Create a `LintDiagnosticBuilder` from some existing `DiagnosticBuilder`.
242- pub fn new ( err : DiagnosticBuilder < ' a , G > ) -> LintDiagnosticBuilder < ' a , G > {
243- LintDiagnosticBuilder ( err)
244- }
245- }
246-
247- impl < ' a > LintDiagnosticBuilder < ' a , ErrorGuaranteed > {
248- pub fn forget_guarantee ( self ) -> LintDiagnosticBuilder < ' a , ( ) > {
249- LintDiagnosticBuilder ( self . 0 . forget_guarantee ( ) )
250- }
251- }
252-
253228pub fn explain_lint_level_source (
254229 lint : & ' static Lint ,
255230 level : Level ,
0 commit comments