@@ -224,7 +224,7 @@ fn check_hash_peq<'tcx>(
224
224
mess,
225
225
|diag| {
226
226
if let Some ( local_def_id) = impl_id. as_local( ) {
227
- let hir_id = cx. tcx. hir( ) . as_local_hir_id ( local_def_id) ;
227
+ let hir_id = cx. tcx. hir( ) . local_def_id_to_hir_id ( local_def_id) ;
228
228
diag. span_note(
229
229
cx. tcx. hir( ) . span( hir_id) ,
230
230
"`PartialEq` implemented here"
@@ -278,7 +278,7 @@ fn check_ord_partial_ord<'tcx>(
278
278
mess,
279
279
|diag| {
280
280
if let Some ( local_def_id) = impl_id. as_local( ) {
281
- let hir_id = cx. tcx. hir( ) . as_local_hir_id ( local_def_id) ;
281
+ let hir_id = cx. tcx. hir( ) . local_def_id_to_hir_id ( local_def_id) ;
282
282
diag. span_note(
283
283
cx. tcx. hir( ) . span( hir_id) ,
284
284
"`PartialOrd` implemented here"
@@ -341,7 +341,7 @@ fn check_unsafe_derive_deserialize<'tcx>(
341
341
ty : Ty < ' tcx > ,
342
342
) {
343
343
fn item_from_def_id < ' tcx > ( cx : & LateContext < ' tcx > , def_id : DefId ) -> & ' tcx Item < ' tcx > {
344
- let hir_id = cx. tcx . hir ( ) . as_local_hir_id ( def_id. expect_local ( ) ) ;
344
+ let hir_id = cx. tcx . hir ( ) . local_def_id_to_hir_id ( def_id. expect_local ( ) ) ;
345
345
cx. tcx . hir ( ) . expect_item ( hir_id)
346
346
}
347
347
@@ -355,7 +355,7 @@ fn check_unsafe_derive_deserialize<'tcx>(
355
355
if match_path( & trait_ref. path, & paths:: SERDE_DESERIALIZE ) ;
356
356
if let ty:: Adt ( def, _) = ty. kind;
357
357
if let Some ( local_def_id) = def. did. as_local( ) ;
358
- let adt_hir_id = cx. tcx. hir( ) . as_local_hir_id ( local_def_id) ;
358
+ let adt_hir_id = cx. tcx. hir( ) . local_def_id_to_hir_id ( local_def_id) ;
359
359
if !is_allowed( cx, UNSAFE_DERIVE_DESERIALIZE , adt_hir_id) ;
360
360
if cx. tcx. inherent_impls( def. did)
361
361
. iter( )
0 commit comments