File tree 2 files changed +10
-2
lines changed
compiler/rustc_smir/src/stable_mir/mir
tests/ui-fulldeps/stable-mir
2 files changed +10
-2
lines changed Original file line number Diff line number Diff line change
1
+ #[ derive( Clone , Debug ) ]
1
2
pub struct Body {
2
3
pub blocks : Vec < BasicBlock > ,
3
4
}
4
5
6
+ #[ derive( Clone , Debug ) ]
5
7
pub struct BasicBlock {
6
8
pub statements : Vec < Statement > ,
7
9
pub terminator : Terminator ,
8
10
}
9
11
12
+ #[ derive( Clone , Debug ) ]
10
13
pub enum Terminator {
11
14
Goto {
12
15
target : usize ,
@@ -41,21 +44,25 @@ pub enum Terminator {
41
44
} ,
42
45
}
43
46
47
+ #[ derive( Clone , Debug ) ]
44
48
pub enum Statement {
45
49
Assign ( Place , Operand ) ,
46
50
Nop ,
47
51
}
48
52
53
+ #[ derive( Clone , Debug ) ]
49
54
pub enum Operand {
50
55
Copy ( Place ) ,
51
56
Move ( Place ) ,
52
57
Constant ( String ) ,
53
58
}
54
59
60
+ #[ derive( Clone , Debug ) ]
55
61
pub struct Place {
56
62
pub local : usize ,
57
63
}
58
64
65
+ #[ derive( Clone , Debug ) ]
59
66
pub struct SwitchTarget {
60
67
pub value : u128 ,
61
68
pub target : usize ,
Original file line number Diff line number Diff line change 4
4
// ignore-stage-1
5
5
// ignore-cross-compile
6
6
// ignore-remote
7
+ // edition: 2021
7
8
8
9
#![ feature( rustc_private) ]
9
10
@@ -43,11 +44,11 @@ fn test_stable_mir(tcx: TyCtxt<'_>) {
43
44
assert_eq ! ( block. statements. len( ) , 1 ) ;
44
45
match & block. statements [ 0 ] {
45
46
stable_mir:: mir:: Statement :: Assign ( ..) => { }
46
- _ => panic ! ( ) ,
47
+ other => panic ! ( "{other:?}" ) ,
47
48
}
48
49
match & block. terminator {
49
50
stable_mir:: mir:: Terminator :: Return => { }
50
- _ => panic ! ( ) ,
51
+ other => panic ! ( "{other:?}" ) ,
51
52
}
52
53
}
53
54
You can’t perform that action at this time.
0 commit comments