@@ -144,7 +144,7 @@ fn msg_span_from_early_bound_and_free_regions(
144144 let sm = tcx. sess . source_map ( ) ;
145145
146146 let scope = region. free_region_binding_scope ( tcx) ;
147- let node = tcx. hir ( ) . as_local_hir_id ( scope. expect_local ( ) ) ;
147+ let node = tcx. hir ( ) . local_def_id_to_hir_id ( scope. expect_local ( ) ) ;
148148 let tag = match tcx. hir ( ) . find ( node) {
149149 Some ( Node :: Block ( _) | Node :: Expr ( _) ) => "body" ,
150150 Some ( Node :: Item ( it) ) => item_scope_tag ( & it) ,
@@ -1707,7 +1707,7 @@ impl<'a, 'tcx> InferCtxt<'a, 'tcx> {
17071707 . in_progress_typeck_results
17081708 . map ( |typeck_results| typeck_results. borrow ( ) . hir_owner )
17091709 . map ( |owner| {
1710- let hir_id = hir. as_local_hir_id ( owner) ;
1710+ let hir_id = hir. local_def_id_to_hir_id ( owner) ;
17111711 let parent_id = hir. get_parent_item ( hir_id) ;
17121712 (
17131713 // Parent item could be a `mod`, so we check the HIR before calling:
@@ -1733,7 +1733,7 @@ impl<'a, 'tcx> InferCtxt<'a, 'tcx> {
17331733 // Get the `hir::Param` to verify whether it already has any bounds.
17341734 // We do this to avoid suggesting code that ends up as `T: 'a'b`,
17351735 // instead we suggest `T: 'a + 'b` in that case.
1736- let id = hir. as_local_hir_id ( def_id) ;
1736+ let id = hir. local_def_id_to_hir_id ( def_id) ;
17371737 let mut has_bounds = false ;
17381738 if let Node :: GenericParam ( param) = hir. get ( id) {
17391739 has_bounds = !param. bounds . is_empty ( ) ;
@@ -1786,7 +1786,10 @@ impl<'a, 'tcx> InferCtxt<'a, 'tcx> {
17861786 . and_then ( |( _, g) | g. params . first ( ) )
17871787 . and_then ( |param| param. def_id . as_local ( ) )
17881788 . map ( |def_id| {
1789- ( hir. span ( hir. as_local_hir_id ( def_id) ) . shrink_to_lo ( ) , format ! ( "{}, " , new_lt) )
1789+ (
1790+ hir. span ( hir. local_def_id_to_hir_id ( def_id) ) . shrink_to_lo ( ) ,
1791+ format ! ( "{}, " , new_lt) ,
1792+ )
17901793 } ) ;
17911794
17921795 let labeled_user_string = match bound_kind {
0 commit comments