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