@@ -215,7 +215,6 @@ fn late_report_deprecation(
215
215
suggestion : Option < Symbol > ,
216
216
lint : & ' static Lint ,
217
217
span : Span ,
218
- def_id : DefId ,
219
218
hir_id : HirId ,
220
219
) {
221
220
if span. in_derive_expansion ( ) {
@@ -229,9 +228,6 @@ fn late_report_deprecation(
229
228
}
230
229
diag. emit ( )
231
230
} ) ;
232
- if hir_id == hir:: DUMMY_HIR_ID {
233
- span_bug ! ( span, "emitted a {} lint with dummy HIR id: {:?}" , lint. name, def_id) ;
234
- }
235
231
}
236
232
237
233
/// Result of `TyCtxt::eval_stability`.
@@ -296,7 +292,7 @@ impl<'tcx> TyCtxt<'tcx> {
296
292
if !skip {
297
293
let ( message, lint) =
298
294
deprecation_message ( & depr_entry. attr , & self . def_path_str ( def_id) ) ;
299
- late_report_deprecation ( self , & message, None , lint, span, def_id , id) ;
295
+ late_report_deprecation ( self , & message, None , lint, span, id) ;
300
296
}
301
297
} ;
302
298
}
@@ -319,15 +315,7 @@ impl<'tcx> TyCtxt<'tcx> {
319
315
if let Some ( depr) = & stability. rustc_depr {
320
316
let ( message, lint) =
321
317
rustc_deprecation_message ( depr, & self . def_path_str ( def_id) ) ;
322
- late_report_deprecation (
323
- self ,
324
- & message,
325
- depr. suggestion ,
326
- lint,
327
- span,
328
- def_id,
329
- id,
330
- ) ;
318
+ late_report_deprecation ( self , & message, depr. suggestion , lint, span, id) ;
331
319
}
332
320
}
333
321
}
0 commit comments