rust/tests/ui/target-feature/forbidden-target-feature-attribute.rs
Ralf Jung ffad9aac27 mark some target features as 'forbidden' so they cannot be (un)set
For now, this is just a warning, but should become a hard error in the future
2024-11-04 22:56:47 +01:00

13 lines
297 B
Rust

//@ compile-flags: --target=x86_64-unknown-linux-gnu --crate-type=lib
//@ needs-llvm-components: x86
#![feature(no_core, lang_items)]
#![no_std]
#![no_core]
#[lang = "sized"]
pub trait Sized {}
#[target_feature(enable = "soft-float")]
//~^ERROR: cannot be toggled with
pub unsafe fn my_fun() {}