@@ -76,7 +76,7 @@ fn visit_implementation_of_drop<'a, 'tcx>(tcx: TyCtxt<'a, 'tcx, 'tcx>, impl_did:
76
76
fn visit_implementation_of_copy < ' a , ' tcx > ( tcx : TyCtxt < ' a , ' tcx , ' tcx > , impl_did : DefId ) {
77
77
debug ! ( "visit_implementation_of_copy: impl_did={:?}" , impl_did) ;
78
78
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) {
80
80
n
81
81
} else {
82
82
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:
87
87
debug ! ( "visit_implementation_of_copy: self_type={:?} (bound)" ,
88
88
self_type) ;
89
89
90
- let span = tcx. hir ( ) . span ( impl_node_id ) ;
90
+ let span = tcx. hir ( ) . span_by_hir_id ( impl_hir_id ) ;
91
91
let param_env = tcx. param_env ( impl_did) ;
92
92
assert ! ( !self_type. has_escaping_bound_vars( ) ) ;
93
93
@@ -97,7 +97,7 @@ fn visit_implementation_of_copy<'a, 'tcx>(tcx: TyCtxt<'a, 'tcx, 'tcx>, impl_did:
97
97
match param_env. can_type_implement_copy ( tcx, self_type) {
98
98
Ok ( ( ) ) => { }
99
99
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 ) ;
101
101
let span = if let ItemKind :: Impl ( .., Some ( ref tr) , _, _) = item. node {
102
102
tr. path . span
103
103
} else {
@@ -114,7 +114,7 @@ fn visit_implementation_of_copy<'a, 'tcx>(tcx: TyCtxt<'a, 'tcx, 'tcx>, impl_did:
114
114
err. emit ( )
115
115
}
116
116
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 ) ;
118
118
let span = if let ItemKind :: Impl ( .., ref ty, _) = item. node {
119
119
ty. span
120
120
} else {
0 commit comments