about summary refs log tree commit diff
path: root/tests/ui/target-feature/abi-required-target-feature-attribute.rs
blob: 5eb9e85f85f6b558d10d011c32b45b5af8443a26 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
//! Enabling a target feature that is anyway required changes nothing, so this is allowed
//! for `#[target_feature]`.
//@ 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]

#[lang = "pointee_sized"]
pub trait PointeeSized {}

#[lang = "meta_sized"]
pub trait MetaSized: PointeeSized {}

#[lang = "sized"]
pub trait Sized: MetaSized {}

#[target_feature(enable = "x87")]
pub unsafe fn my_fun() {}