1
Fork 0

explicitly model that certain ABIs require/forbid certain target features

This commit is contained in:
Ralf Jung 2024-12-26 18:32:22 +01:00
parent 41b579660c
commit 2bf27e09be
18 changed files with 304 additions and 273 deletions

View file

@ -1,11 +1,11 @@
//@ compile-flags: --target=x86_64-unknown-linux-gnu --crate-type=lib
//@ needs-llvm-components: x86
#![feature(no_core, lang_items)]
//@ compile-flags: --target=riscv32e-unknown-none-elf --crate-type=lib
//@ needs-llvm-components: riscv
#![feature(no_core, lang_items, riscv_target_feature)]
#![no_core]
#[lang = "sized"]
pub trait Sized {}
#[target_feature(enable = "x87")]
//~^ERROR: cannot be toggled with
#[target_feature(enable = "d")]
//~^ERROR: cannot be enabled with
pub unsafe fn my_fun() {}