]> git.lizzy.rs Git - rust.git/blob - src/test/mir-opt/inline-retag.rs
Simplify Cache wrapper to single type, impl Deref on it, fix all compilation errors...
[rust.git] / src / test / mir-opt / inline-retag.rs
1 // compile-flags: -Z span_free_formats -Z mir-emit-retag
2
3 // Tests that MIR inliner fixes up `Retag`'s `fn_entry` flag
4
5 fn main() {
6     println!("{}", bar());
7 }
8
9 fn bar() -> bool {
10     let f = foo;
11     f(&1, &-1)
12 }
13
14 #[inline(always)]
15 fn foo(x: &i32, y: &i32) -> bool {
16     *x == *y
17 }
18
19 // END RUST SOURCE
20 // START rustc.bar.Inline.after.mir
21 // ...
22 //     bb0: {
23 //         ...
24 //         Retag(_3);
25 //         ...
26 //         Retag(_3);
27 //         Retag(_6);
28 //         StorageLive(_9);
29 //         _9 = (*_3);
30 //         StorageLive(_10);
31 //         _10 = (*_6);
32 //         _0 = Eq(move _9, move _10);
33 //         ...
34 //         return;
35 //     }
36 // ...
37 // END rustc.bar.Inline.after.mir