@@ -76,7 +76,7 @@ fn visit_implementation_of_drop<'a, 'tcx>(tcx: TyCtxt<'a, 'tcx, 'tcx>, impl_did:
7676fn visit_implementation_of_copy < ' a , ' tcx > ( tcx : TyCtxt < ' a , ' tcx , ' tcx > , impl_did : DefId ) {
7777 debug ! ( "visit_implementation_of_copy: impl_did={:?}" , impl_did) ;
7878
79- let impl_node_id = if let Some ( n) = tcx. hir ( ) . as_local_node_id ( impl_did) {
79+ let impl_hir_id = if let Some ( n) = tcx. hir ( ) . as_local_hir_id ( impl_did) {
8080 n
8181 } else {
8282 debug ! ( "visit_implementation_of_copy(): impl not in this crate" ) ;
@@ -87,7 +87,7 @@ fn visit_implementation_of_copy<'a, 'tcx>(tcx: TyCtxt<'a, 'tcx, 'tcx>, impl_did:
8787 debug ! ( "visit_implementation_of_copy: self_type={:?} (bound)" ,
8888 self_type) ;
8989
90- let span = tcx. hir ( ) . span ( impl_node_id ) ;
90+ let span = tcx. hir ( ) . span_by_hir_id ( impl_hir_id ) ;
9191 let param_env = tcx. param_env ( impl_did) ;
9292 assert ! ( !self_type. has_escaping_bound_vars( ) ) ;
9393
@@ -97,7 +97,7 @@ fn visit_implementation_of_copy<'a, 'tcx>(tcx: TyCtxt<'a, 'tcx, 'tcx>, impl_did:
9797 match param_env. can_type_implement_copy ( tcx, self_type) {
9898 Ok ( ( ) ) => { }
9999 Err ( CopyImplementationError :: InfrigingFields ( fields) ) => {
100- let item = tcx. hir ( ) . expect_item ( impl_node_id ) ;
100+ let item = tcx. hir ( ) . expect_item_by_hir_id ( impl_hir_id ) ;
101101 let span = if let ItemKind :: Impl ( .., Some ( ref tr) , _, _) = item. node {
102102 tr. path . span
103103 } else {
@@ -114,7 +114,7 @@ fn visit_implementation_of_copy<'a, 'tcx>(tcx: TyCtxt<'a, 'tcx, 'tcx>, impl_did:
114114 err. emit ( )
115115 }
116116 Err ( CopyImplementationError :: NotAnAdt ) => {
117- let item = tcx. hir ( ) . expect_item ( impl_node_id ) ;
117+ let item = tcx. hir ( ) . expect_item_by_hir_id ( impl_hir_id ) ;
118118 let span = if let ItemKind :: Impl ( .., ref ty, _) = item. node {
119119 ty. span
120120 } else {
0 commit comments