@@ -47,12 +47,12 @@ fn test_stable_mir(_tcx: TyCtxt<'_>) -> ControlFlow<()> {
47
47
assert_eq ! ( body. blocks. len( ) , 1 ) ;
48
48
let block = & body. blocks [ 0 ] ;
49
49
assert_eq ! ( block. statements. len( ) , 1 ) ;
50
- match & block. statements [ 0 ] {
51
- stable_mir:: mir:: Statement :: Assign ( ..) => { }
50
+ match & block. statements [ 0 ] . kind {
51
+ stable_mir:: mir:: StatementKind :: Assign ( ..) => { }
52
52
other => panic ! ( "{other:?}" ) ,
53
53
}
54
- match & block. terminator {
55
- stable_mir:: mir:: Terminator :: Return => { }
54
+ match & block. terminator . kind {
55
+ stable_mir:: mir:: TerminatorKind :: Return => { }
56
56
other => panic ! ( "{other:?}" ) ,
57
57
}
58
58
@@ -61,36 +61,36 @@ fn test_stable_mir(_tcx: TyCtxt<'_>) -> ControlFlow<()> {
61
61
assert_eq ! ( body. locals. len( ) , 7 ) ;
62
62
assert_eq ! ( body. blocks. len( ) , 4 ) ;
63
63
let block = & body. blocks [ 0 ] ;
64
- match & block. terminator {
65
- stable_mir:: mir:: Terminator :: Call { .. } => { }
64
+ match & block. terminator . kind {
65
+ stable_mir:: mir:: TerminatorKind :: Call { .. } => { }
66
66
other => panic ! ( "{other:?}" ) ,
67
67
}
68
68
69
69
let types = get_item ( & items, ( DefKind :: Fn , "types" ) ) . unwrap ( ) ;
70
70
let body = types. body ( ) ;
71
71
assert_eq ! ( body. locals. len( ) , 6 ) ;
72
72
assert_matches ! (
73
- body. locals[ 0 ] . kind( ) ,
73
+ body. locals[ 0 ] . ty . kind( ) ,
74
74
stable_mir:: ty:: TyKind :: RigidTy ( stable_mir:: ty:: RigidTy :: Bool )
75
75
) ;
76
76
assert_matches ! (
77
- body. locals[ 1 ] . kind( ) ,
77
+ body. locals[ 1 ] . ty . kind( ) ,
78
78
stable_mir:: ty:: TyKind :: RigidTy ( stable_mir:: ty:: RigidTy :: Bool )
79
79
) ;
80
80
assert_matches ! (
81
- body. locals[ 2 ] . kind( ) ,
81
+ body. locals[ 2 ] . ty . kind( ) ,
82
82
stable_mir:: ty:: TyKind :: RigidTy ( stable_mir:: ty:: RigidTy :: Char )
83
83
) ;
84
84
assert_matches ! (
85
- body. locals[ 3 ] . kind( ) ,
85
+ body. locals[ 3 ] . ty . kind( ) ,
86
86
stable_mir:: ty:: TyKind :: RigidTy ( stable_mir:: ty:: RigidTy :: Int ( stable_mir:: ty:: IntTy :: I32 ) )
87
87
) ;
88
88
assert_matches ! (
89
- body. locals[ 4 ] . kind( ) ,
89
+ body. locals[ 4 ] . ty . kind( ) ,
90
90
stable_mir:: ty:: TyKind :: RigidTy ( stable_mir:: ty:: RigidTy :: Uint ( stable_mir:: ty:: UintTy :: U64 ) )
91
91
) ;
92
92
assert_matches ! (
93
- body. locals[ 5 ] . kind( ) ,
93
+ body. locals[ 5 ] . ty . kind( ) ,
94
94
stable_mir:: ty:: TyKind :: RigidTy ( stable_mir:: ty:: RigidTy :: Float (
95
95
stable_mir:: ty:: FloatTy :: F64
96
96
) )
@@ -100,24 +100,24 @@ fn test_stable_mir(_tcx: TyCtxt<'_>) -> ControlFlow<()> {
100
100
let body = drop. body ( ) ;
101
101
assert_eq ! ( body. blocks. len( ) , 2 ) ;
102
102
let block = & body. blocks [ 0 ] ;
103
- match & block. terminator {
104
- stable_mir:: mir:: Terminator :: Drop { .. } => { }
103
+ match & block. terminator . kind {
104
+ stable_mir:: mir:: TerminatorKind :: Drop { .. } => { }
105
105
other => panic ! ( "{other:?}" ) ,
106
106
}
107
107
108
108
let assert = get_item ( & items, ( DefKind :: Fn , "assert" ) ) . unwrap ( ) ;
109
109
let body = assert. body ( ) ;
110
110
assert_eq ! ( body. blocks. len( ) , 2 ) ;
111
111
let block = & body. blocks [ 0 ] ;
112
- match & block. terminator {
113
- stable_mir:: mir:: Terminator :: Assert { .. } => { }
112
+ match & block. terminator . kind {
113
+ stable_mir:: mir:: TerminatorKind :: Assert { .. } => { }
114
114
other => panic ! ( "{other:?}" ) ,
115
115
}
116
116
117
117
let monomorphic = get_item ( & items, ( DefKind :: Fn , "monomorphic" ) ) . unwrap ( ) ;
118
118
for block in monomorphic. body ( ) . blocks {
119
- match & block. terminator {
120
- stable_mir:: mir:: Terminator :: Call { func, .. } => match func {
119
+ match & block. terminator . kind {
120
+ stable_mir:: mir:: TerminatorKind :: Call { func, .. } => match func {
121
121
stable_mir:: mir:: Operand :: Constant ( c) => match & c. literal . literal {
122
122
stable_mir:: ty:: ConstantKind :: Allocated ( alloc) => {
123
123
assert ! ( alloc. bytes. is_empty( ) ) ;
@@ -127,7 +127,7 @@ fn test_stable_mir(_tcx: TyCtxt<'_>) -> ControlFlow<()> {
127
127
mut args,
128
128
) ) => {
129
129
let func = def. body ( ) ;
130
- match func. locals [ 1 ]
130
+ match func. locals [ 1 ] . ty
131
131
. fold ( & mut args)
132
132
. continue_value ( )
133
133
. unwrap ( )
@@ -149,7 +149,7 @@ fn test_stable_mir(_tcx: TyCtxt<'_>) -> ControlFlow<()> {
149
149
} ,
150
150
other => panic ! ( "{other:?}" ) ,
151
151
} ,
152
- stable_mir:: mir:: Terminator :: Return => { }
152
+ stable_mir:: mir:: TerminatorKind :: Return => { }
153
153
other => panic ! ( "{other:?}" ) ,
154
154
}
155
155
}
0 commit comments