rust/tests/ui/lang-items/start_lang_item_with_target_feature.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

20 lines
420 B
Rust
Raw Normal View History

//@ only-x86_64
//@ check-fail
#![feature(lang_items, no_core, target_feature_11)]
#![no_core]
#[lang = "copy"]
pub trait Copy {}
#[lang = "sized"]
pub trait Sized {}
#[lang = "start"]
#[target_feature(enable = "avx2")]
//~^ ERROR `start` lang item function is not allowed to have `#[target_feature]`
fn start<T>(_main: fn() -> T, _argc: isize, _argv: *const *const u8, _sigpipe: u8) -> isize {
0
}
fn main() {}