about summary refs log tree commit diff
path: root/tests/ui/force-inlining/inherent.rs
blob: 25c76eaf37a91e1e9c4b37376b3f2c872df0d4d0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
//@ check-fail
#![feature(rustc_attrs)]

struct Foo;

impl Foo {
    #[rustc_force_inline]
    //~^ ERROR: `Foo::bar` is incompatible with `#[rustc_force_inline]`
    #[rustc_no_mir_inline]
    fn bar() {}
}

fn bar_caller() {
    unsafe {
        Foo::bar();
    }
}

fn main() {
    bar_caller();
}