about summary refs log tree commit diff
path: root/tests/mir-opt/inline/forced_inherent_ambiguous.rs
blob: e3c5d3e4f9e81c5151957197c5e4b286158ee5c5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
// EMIT_MIR_FOR_EACH_PANIC_STRATEGY
//@ compile-flags: -Copt-level=0 --crate-type=lib
#![feature(rustc_attrs)]

struct Foo;

impl Foo {
    #[rustc_force_inline]
    fn bar() {}
}

trait Tr {
    fn bar();
}

impl Tr for Foo {
    fn bar() {}
}

// EMIT_MIR forced_inherent_ambiguous.caller.ForceInline.diff
fn caller() {
    Foo::bar();
    // CHECK-LABEL: fn caller(
    // CHECK: (inlined Foo::bar)
}