Files
rust/tests/ui/target-feature/forbidden-target-feature-attribute.rs

15 lines
410 B
Rust
Raw Permalink Normal View History

//! Ensure "forbidden" target features cannot be enabled via `#[target_feature]`.
//@ compile-flags: --target=riscv32e-unknown-none-elf --crate-type=lib
//@ needs-llvm-components: riscv
//@ ignore-backends: gcc
2025-10-17 16:20:44 +02:00
//@ add-core-stubs
#![feature(no_core)]
#![no_core]
2025-10-17 16:20:44 +02:00
extern crate minicore;
use minicore::*;
#[target_feature(enable = "forced-atomics")]
//~^ERROR: cannot be enabled with
pub unsafe fn my_fun() {}