@@ -224,7 +224,7 @@ fn check_hash_peq<'tcx>(
224224 mess,
225225 |diag| {
226226 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) ;
228228 diag. span_note(
229229 cx. tcx. hir( ) . span( hir_id) ,
230230 "`PartialEq` implemented here"
@@ -278,7 +278,7 @@ fn check_ord_partial_ord<'tcx>(
278278 mess,
279279 |diag| {
280280 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) ;
282282 diag. span_note(
283283 cx. tcx. hir( ) . span( hir_id) ,
284284 "`PartialOrd` implemented here"
@@ -341,7 +341,7 @@ fn check_unsafe_derive_deserialize<'tcx>(
341341 ty : Ty < ' tcx > ,
342342) {
343343 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 ( ) ) ;
345345 cx. tcx . hir ( ) . expect_item ( hir_id)
346346 }
347347
@@ -355,7 +355,7 @@ fn check_unsafe_derive_deserialize<'tcx>(
355355 if match_path( & trait_ref. path, & paths:: SERDE_DESERIALIZE ) ;
356356 if let ty:: Adt ( def, _) = ty. kind;
357357 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) ;
359359 if !is_allowed( cx, UNSAFE_DERIVE_DESERIALIZE , adt_hir_id) ;
360360 if cx. tcx. inherent_impls( def. did)
361361 . iter( )
0 commit comments