2025-01-27 18:18:13 +01:00
|
|
|
//! Ensure ABI-incompatible features cannot be enabled via `-Ctarget-feature`.
|
2025-04-28 15:40:44 +02:00
|
|
|
// These are just warnings for now.
|
|
|
|
|
//@ check-pass
|
|
|
|
|
//@ compile-flags: --crate-type=lib
|
|
|
|
|
//@ revisions: x86 riscv
|
|
|
|
|
//@[x86] compile-flags: --target=x86_64-unknown-linux-gnu -Ctarget-feature=+soft-float
|
|
|
|
|
//@[x86] needs-llvm-components: x86
|
|
|
|
|
//@[riscv] compile-flags: --target=riscv32e-unknown-none-elf -Ctarget-feature=+d
|
|
|
|
|
//@[riscv] needs-llvm-components: riscv
|
2025-03-29 02:41:32 +03:00
|
|
|
|
2025-01-27 18:18:13 +01:00
|
|
|
#![feature(no_core, lang_items, riscv_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 {}
|
|
|
|
|
|
2025-01-27 18:18:13 +01:00
|
|
|
#[lang = "sized"]
|
|
|
|
|
pub trait Sized {}
|
2025-04-28 15:40:44 +02:00
|
|
|
#[lang = "freeze"]
|
|
|
|
|
pub trait Freeze {}
|
2025-03-29 02:41:32 +03:00
|
|
|
|
2025-04-28 15:40:44 +02:00
|
|
|
//~? WARN must be disabled to ensure that the ABI of the current target can be implemented correctly
|
|
|
|
|
//~? WARN unstable feature specified for `-Ctarget-feature`
|