]> git.lizzy.rs Git - rust.git/blob - src/test/mir-opt/inline-any-operand.rs
Rollup merge of #65389 - ecstatic-morse:zero-sized-array-no-drop, r=eddyb
[rust.git] / src / test / mir-opt / inline-any-operand.rs
1 // compile-flags: -Z span_free_formats
2
3 // Tests that MIR inliner works for any operand
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 //     _0 = Eq(move _3, move _4);
25 //     ...
26 //     return;
27 // }
28 // ...
29 // END rustc.bar.Inline.after.mir