rust/tests/mir-opt/inline/inline_any_operand.rs
2023-01-11 09:32:08 +00:00

19 lines
299 B
Rust

// compile-flags: -Z span_free_formats
// Tests that MIR inliner works for any operand
fn main() {
println!("{}", bar());
}
// EMIT_MIR inline_any_operand.bar.Inline.after.mir
fn bar() -> bool {
let f = foo;
f(1, -1)
}
#[inline(always)]
fn foo(x: i32, y: i32) -> bool {
x == y
}