mirror of
https://github.com/rust-lang/rust.git
synced 2025-10-02 10:18:25 +00:00

As before, add `MetaSized` and `PointeeSized` traits to all of the non-minicore `no_core` tests so that they don't fail for lack of language items.
19 lines
500 B
Rust
19 lines
500 B
Rust
//! Ensure "forbidden" target 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)]
|
|
#![no_core]
|
|
|
|
#[lang = "pointee_sized"]
|
|
pub trait PointeeSized {}
|
|
|
|
#[lang = "meta_sized"]
|
|
pub trait MetaSized: PointeeSized {}
|
|
|
|
#[lang = "sized"]
|
|
pub trait Sized: MetaSized {}
|
|
|
|
#[target_feature(enable = "forced-atomics")]
|
|
//~^ERROR: cannot be enabled with
|
|
pub unsafe fn my_fun() {}
|