about summary refs log tree commit diff
path: root/tests/mir-opt/inline/forced_dead_code.rs
blob: 832272cde7f0a905f62ce251977f23c97c95b4cb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
// EMIT_MIR_FOR_EACH_PANIC_STRATEGY
//@ compile-flags: -Copt-level=0 -Clink-dead-code
#![feature(rustc_attrs)]

#[rustc_force_inline]
pub fn callee_forced() {}

// EMIT_MIR forced_dead_code.caller.ForceInline.diff
pub fn caller() {
    callee_forced();
    // CHECK-LABEL: fn caller(
    // CHECK: (inlined callee_forced)
}

fn main() {
    caller();
}