@@ -2,10 +2,7 @@ use std::cmp;
2
2
3
3
use rustc_data_structures:: fx:: FxHashMap ;
4
4
use 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 } ;
9
6
use rustc_hir:: HirId ;
10
7
use rustc_index:: vec:: IndexVec ;
11
8
use rustc_query_system:: ich:: StableHashingContext ;
@@ -228,28 +225,6 @@ impl LintExpectation {
228
225
}
229
226
}
230
227
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
-
253
228
pub fn explain_lint_level_source (
254
229
lint : & ' static Lint ,
255
230
level : Level ,
0 commit comments