2025-04-28 15:22:14 +02:00
|
|
|
//! Enabling a target feature that is anyway required changes nothing, so this is allowed
|
|
|
|
|
//! for `#[target_feature]`.
|
2024-11-16 10:26:46 +01:00
|
|
|
//@ compile-flags: --target=x86_64-unknown-none --crate-type=lib
|
|
|
|
|
//@ needs-llvm-components: x86
|
|
|
|
|
//@ build-pass
|
|
|
|
|
#![feature(no_core, lang_items, x87_target_feature)]
|
|
|
|
|
#![no_core]
|
|
|
|
|
|
2025-01-23 11:25:12 +00:00
|
|
|
#[lang = "pointee_sized"]
|
|
|
|
|
pub trait PointeeSized {}
|
|
|
|
|
|
|
|
|
|
#[lang = "meta_sized"]
|
|
|
|
|
pub trait MetaSized: PointeeSized {}
|
|
|
|
|
|
2024-11-16 10:26:46 +01:00
|
|
|
#[lang = "sized"]
|
2025-01-23 11:25:12 +00:00
|
|
|
pub trait Sized: MetaSized {}
|
2024-11-16 10:26:46 +01:00
|
|
|
|
|
|
|
|
#[target_feature(enable = "x87")]
|
|
|
|
|
pub unsafe fn my_fun() {}
|