@@ -144,7 +144,7 @@ fn msg_span_from_early_bound_and_free_regions(
144
144
let sm = tcx. sess . source_map ( ) ;
145
145
146
146
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 ( ) ) ;
148
148
let tag = match tcx. hir ( ) . find ( node) {
149
149
Some ( Node :: Block ( _) | Node :: Expr ( _) ) => "body" ,
150
150
Some ( Node :: Item ( it) ) => item_scope_tag ( & it) ,
@@ -1707,7 +1707,7 @@ impl<'a, 'tcx> InferCtxt<'a, 'tcx> {
1707
1707
. in_progress_typeck_results
1708
1708
. map ( |typeck_results| typeck_results. borrow ( ) . hir_owner )
1709
1709
. map ( |owner| {
1710
- let hir_id = hir. as_local_hir_id ( owner) ;
1710
+ let hir_id = hir. local_def_id_to_hir_id ( owner) ;
1711
1711
let parent_id = hir. get_parent_item ( hir_id) ;
1712
1712
(
1713
1713
// Parent item could be a `mod`, so we check the HIR before calling:
@@ -1733,7 +1733,7 @@ impl<'a, 'tcx> InferCtxt<'a, 'tcx> {
1733
1733
// Get the `hir::Param` to verify whether it already has any bounds.
1734
1734
// We do this to avoid suggesting code that ends up as `T: 'a'b`,
1735
1735
// 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) ;
1737
1737
let mut has_bounds = false ;
1738
1738
if let Node :: GenericParam ( param) = hir. get ( id) {
1739
1739
has_bounds = !param. bounds . is_empty ( ) ;
@@ -1786,7 +1786,10 @@ impl<'a, 'tcx> InferCtxt<'a, 'tcx> {
1786
1786
. and_then ( |( _, g) | g. params . first ( ) )
1787
1787
. and_then ( |param| param. def_id . as_local ( ) )
1788
1788
. 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
+ )
1790
1793
} ) ;
1791
1794
1792
1795
let labeled_user_string = match bound_kind {
0 commit comments