mirror of
https://github.com/rust-lang/rust.git
synced 2025-05-01 12:37:37 +00:00
24 lines
530 B
Rust
24 lines
530 B
Rust
//@ check-fail
|
|
//@ compile-flags: --crate-type=lib
|
|
#![allow(internal_features)]
|
|
#![feature(rustc_attrs)]
|
|
|
|
// Test that forced inlining w/ errors works as expected.
|
|
|
|
#[rustc_no_mir_inline]
|
|
#[rustc_force_inline]
|
|
//~^ ERROR `callee` is incompatible with `#[rustc_force_inline]`
|
|
pub fn callee() {
|
|
}
|
|
|
|
#[rustc_no_mir_inline]
|
|
#[rustc_force_inline = "the test requires it"]
|
|
//~^ ERROR `callee_justified` is incompatible with `#[rustc_force_inline]`
|
|
pub fn callee_justified() {
|
|
}
|
|
|
|
pub fn caller() {
|
|
callee();
|
|
callee_justified();
|
|
}
|