2025-01-27 18:18:13 +01:00
|
|
|
//! Ensure ABI-incompatible features cannot be enabled via `#[target_feature]`.
|
2025-04-28 15:40:44 +02:00
|
|
|
// ignore-tidy-linelength
|
|
|
|
|
//@ compile-flags: --crate-type=lib
|
|
|
|
|
//@ revisions: x86 riscv
|
|
|
|
|
//@[x86] compile-flags: --target=x86_64-unknown-linux-gnu
|
|
|
|
|
//@[x86] needs-llvm-components: x86
|
|
|
|
|
//@[riscv] compile-flags: --target=riscv32e-unknown-none-elf
|
|
|
|
|
//@[riscv] needs-llvm-components: riscv
|
|
|
|
|
#![feature(no_core, lang_items, riscv_target_feature, x87_target_feature)]
|
2024-11-16 10:26:46 +01:00
|
|
|
#![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"]
|
|
|
|
|
pub trait Sized {}
|
|
|
|
|
|
2025-04-28 15:40:44 +02:00
|
|
|
#[cfg_attr(x86, target_feature(enable = "soft-float"))] #[cfg_attr(riscv, target_feature(enable = "d"))]
|
2024-12-26 18:32:22 +01:00
|
|
|
//~^ERROR: cannot be enabled with
|
2024-11-16 10:26:46 +01:00
|
|
|
pub unsafe fn my_fun() {}
|