]> git.lizzy.rs Git - rust.git/blob - tests/mir-opt/inline/inline_any_operand.rs
Rollup merge of #106644 - alexcrichton:update-wasi-toolchain, r=cuviper
[rust.git] / tests / mir-opt / inline / 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 // EMIT_MIR inline_any_operand.bar.Inline.after.mir
10 fn bar() -> bool {
11     let f = foo;
12     f(1, -1)
13 }
14
15 #[inline(always)]
16 fn foo(x: i32, y: i32) -> bool {
17     x == y
18 }