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(); }