2018-09-22 16:48:33 -05:00
|
|
|
// 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
|
2018-09-22 16:48:33 -05:00
|
|
|
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
|
|
|
|
}
|