summaryrefslogtreecommitdiffstats
path: root/tests/ui/lang-items/start_lang_item_with_target_feature.rs
blob: 3052b7bb56373aa75183d6cbdc3739c5a8177b94 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
// 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` language 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() {}