File tree Expand file tree Collapse file tree 4 files changed +11
-27
lines changed
tests/run-make/const_fn_mir Expand file tree Collapse file tree 4 files changed +11
-27
lines changed Original file line number Diff line number Diff line change @@ -24,16 +24,3 @@ fn foo() -> i32 {
2424 return;
2525 }
2626}
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.
43
54use run_make_support:: { diff, rustc} ;
65
76fn 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 ( ) ;
98 diff ( ) . expected_file ( "dump.mir" ) . actual_file ( "dump-actual.mir" ) . run ( ) ;
109}
You can’t perform that action at this time.
0 commit comments