File tree 4 files changed +11
-27
lines changed
tests/run-make/const_fn_mir
4 files changed +11
-27
lines changed Original file line number Diff line number Diff line change @@ -24,16 +24,3 @@ fn foo() -> i32 {
24
24
return;
25
25
}
26
26
}
27
-
28
- fn main() -> () {
29
- let mut _0 : ();
30
- let _1 : i32;
31
-
32
- bb0 : {
33
- _1 = foo() -> [return : bb1, unwind continue];
34
- }
35
-
36
- bb1 : {
37
- return;
38
- }
39
- }
Original file line number Diff line number Diff line change
1
+ // emit-mir
2
+ //@ check-pass
3
+
4
+ #![ crate_type = "lib" ]
5
+
6
+ pub const fn foo ( ) -> i32 {
7
+ 5 + 6
8
+ }
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 1
- // The `needs-unwind -Cpanic=abort` gives a different MIR output.
2
-
3
- //@ needs-unwind
1
+ //! This test is supposed to check that --emit=mir emits both optimized_mir and mir_for_ctfe for a
2
+ //! const fn.
4
3
5
4
use run_make_support:: { diff, rustc} ;
6
5
7
6
fn main ( ) {
8
- rustc ( ) . input ( "main .rs" ) . emit ( "mir" ) . output ( "dump-actual.mir" ) . run ( ) ;
7
+ rustc ( ) . input ( "lib .rs" ) . emit ( "mir" ) . output ( "dump-actual.mir" ) . run ( ) ;
9
8
diff ( ) . expected_file ( "dump.mir" ) . actual_file ( "dump-actual.mir" ) . run ( ) ;
10
9
}
You can’t perform that action at this time.
0 commit comments