about summary refs log tree commit diff
path: root/tests/ui/target-feature/forbidden-hardfloat-target-feature-attribute-e-d.rs
blob: e96e17a42121aaf9041c6347a1c60b3d3cbfed8a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
//! Ensure ABI-incompatible features cannot be enabled via `#[target_feature]`.
//@ 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 = "pointee_sized"]
pub trait PointeeSized {}

#[lang = "meta_sized"]
pub trait MetaSized: PointeeSized {}

#[lang = "sized"]
pub trait Sized: MetaSized {}

#[target_feature(enable = "d")]
//~^ERROR: cannot be enabled with
pub unsafe fn my_fun() {}