@@ -51,7 +51,7 @@ impl LintPass for TenaciousPass {
51
51
} ;
52
52
if item. attrs . iter ( ) . all ( |a| !a. check_name ( "no_move" ) ) {
53
53
for ref field in def. fields . iter ( ) {
54
- if is_ty_no_move ( cx. tcx , ty :: node_id_to_type ( cx. tcx , field. node . id ) ) {
54
+ if is_ty_no_move ( cx. tcx , cx. tcx . node_id_to_type ( field. node . id ) ) {
55
55
cx. span_lint ( MOVED_NO_MOVE , field. span ,
56
56
"Structs containing #[no_move] fields should be marked #[no_move]" )
57
57
}
@@ -63,7 +63,7 @@ impl LintPass for TenaciousPass {
63
63
if map. expect_item ( map. get_parent ( var. node . id ) ) . attrs . iter ( ) . all ( |a| !a. check_name ( "no_move" ) ) {
64
64
match var. node . kind {
65
65
TupleVariantKind ( _) => {
66
- if is_ty_no_move ( cx. tcx , ty :: node_id_to_type ( cx. tcx , var. node . id ) ) {
66
+ if is_ty_no_move ( cx. tcx , cx. tcx . node_id_to_type ( var. node . id ) ) {
67
67
cx. span_lint ( MOVED_NO_MOVE , var. span ,
68
68
"Enums containing #[no_move] fields should be marked #[no_move]" )
69
69
}
@@ -125,10 +125,10 @@ impl<'a, 'tcx: 'a> euv::Delegate<'tcx> for TenaciousDelegate<'a, 'tcx> {
125
125
126
126
fn is_ty_no_move ( tcx : & ty:: ctxt , t : ty:: Ty ) -> bool {
127
127
let mut found = false ;
128
- ty :: maybe_walk_ty ( t , |ty| {
128
+ t . maybe_walk ( |ty| {
129
129
match ty. sty {
130
130
ty:: TyStruct ( did, _) | ty:: TyEnum ( did, _) => {
131
- if ty :: has_attr ( tcx , did, "no_move" ) {
131
+ if tcx . has_attr ( did, "no_move" ) {
132
132
found = true ;
133
133
return false ;
134
134
}
0 commit comments