rust/tests/mir-opt/inline/inline_any_operand.rs

19 lines
299 B
Rust
Raw Normal View History

// compile-flags: -Z span_free_formats
// Tests that MIR inliner works for any operand
fn main() {
println!("{}", bar());
}
2020-07-27 14:22:43 -05:00
// EMIT_MIR inline_any_operand.bar.Inline.after.mir
fn bar() -> bool {
let f = foo;
f(1, -1)
}
2019-01-24 13:05:19 -06:00
#[inline(always)]
fn foo(x: i32, y: i32) -> bool {
x == y
}