rust/tests/ui/lang-items/start_lang_item_with_target_feature.rs
David Wood 322cc31504
tests: {Meta,Pointee}Sized in non-minicore tests
As before, add `MetaSized` and `PointeeSized` traits to all of the
non-minicore `no_core` tests so that they don't fail for lack of
language items.
2025-06-16 23:04:33 +00:00

27 lines
527 B
Rust

//@ only-x86_64
//@ check-fail
#![feature(lang_items, no_core)]
#![no_core]
#[lang = "copy"]
pub trait Copy {}
#[lang = "pointee_sized"]
pub trait PointeeSized {}
#[lang = "meta_sized"]
pub trait MetaSized: PointeeSized {}
#[lang = "sized"]
pub trait Sized: MetaSized {}
#[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() {}