summaryrefslogtreecommitdiffstats
path: root/tests/mir-opt/inline/inline_retag.rs
blob: c6950f26925229d92ce6aad8bdebfc479b5f457e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
// compile-flags: -Z span_free_formats -Z mir-emit-retag

// Tests that MIR inliner fixes up `Retag`'s `fn_entry` flag

fn main() {
    println!("{}", bar());
}

// EMIT_MIR inline_retag.bar.Inline.after.mir
fn bar() -> bool {
    let f = foo;
    f(&1, &-1)
}

#[inline(always)]
fn foo(x: &i32, y: &i32) -> bool {
    *x == *y
}