@@ -215,7 +215,6 @@ fn late_report_deprecation(
215215 suggestion : Option < Symbol > ,
216216 lint : & ' static Lint ,
217217 span : Span ,
218- def_id : DefId ,
219218 hir_id : HirId ,
220219) {
221220 if span. in_derive_expansion ( ) {
@@ -229,9 +228,6 @@ fn late_report_deprecation(
229228 }
230229 diag. emit ( )
231230 } ) ;
232- if hir_id == hir:: DUMMY_HIR_ID {
233- span_bug ! ( span, "emitted a {} lint with dummy HIR id: {:?}" , lint. name, def_id) ;
234- }
235231}
236232
237233/// Result of `TyCtxt::eval_stability`.
@@ -296,7 +292,7 @@ impl<'tcx> TyCtxt<'tcx> {
296292 if !skip {
297293 let ( message, lint) =
298294 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) ;
300296 }
301297 } ;
302298 }
@@ -319,15 +315,7 @@ impl<'tcx> TyCtxt<'tcx> {
319315 if let Some ( depr) = & stability. rustc_depr {
320316 let ( message, lint) =
321317 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) ;
331319 }
332320 }
333321 }
0 commit comments