File tree Expand file tree Collapse file tree 2 files changed +10
-2
lines changed
compiler/rustc_smir/src/stable_mir/mir
tests/ui-fulldeps/stable-mir Expand file tree Collapse file tree 2 files changed +10
-2
lines changed Original file line number Diff line number Diff line change 1+ #[ derive( Clone , Debug ) ]
12pub struct Body {
23 pub blocks : Vec < BasicBlock > ,
34}
45
6+ #[ derive( Clone , Debug ) ]
57pub struct BasicBlock {
68 pub statements : Vec < Statement > ,
79 pub terminator : Terminator ,
810}
911
12+ #[ derive( Clone , Debug ) ]
1013pub enum Terminator {
1114 Goto {
1215 target : usize ,
@@ -41,21 +44,25 @@ pub enum Terminator {
4144 } ,
4245}
4346
47+ #[ derive( Clone , Debug ) ]
4448pub enum Statement {
4549 Assign ( Place , Operand ) ,
4650 Nop ,
4751}
4852
53+ #[ derive( Clone , Debug ) ]
4954pub enum Operand {
5055 Copy ( Place ) ,
5156 Move ( Place ) ,
5257 Constant ( String ) ,
5358}
5459
60+ #[ derive( Clone , Debug ) ]
5561pub struct Place {
5662 pub local : usize ,
5763}
5864
65+ #[ derive( Clone , Debug ) ]
5966pub struct SwitchTarget {
6067 pub value : u128 ,
6168 pub target : usize ,
Original file line number Diff line number Diff line change 44// ignore-stage-1
55// ignore-cross-compile
66// ignore-remote
7+ // edition: 2021
78
89#![ feature( rustc_private) ]
910
@@ -43,11 +44,11 @@ fn test_stable_mir(tcx: TyCtxt<'_>) {
4344 assert_eq ! ( block. statements. len( ) , 1 ) ;
4445 match & block. statements [ 0 ] {
4546 stable_mir:: mir:: Statement :: Assign ( ..) => { }
46- _ => panic ! ( ) ,
47+ other => panic ! ( "{other:?}" ) ,
4748 }
4849 match & block. terminator {
4950 stable_mir:: mir:: Terminator :: Return => { }
50- _ => panic ! ( ) ,
51+ other => panic ! ( "{other:?}" ) ,
5152 }
5253}
5354
You can’t perform that action at this time.
0 commit comments