Skip to content

Commit d3b6a9d

Browse files
committed
Add more core stubs to minicore
`f32`, `f64` and `asm!` macro.
1 parent e97ba53 commit d3b6a9d

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

tests/auxiliary/minicore.rs

+6-2
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,16 @@
66
//!
77
//! - `minicore` is **only** intended for `core` items, and the stubs should match the actual `core`
88
//! items.
9+
//! - Avoid adding new features and things that are only available for a subset of targets, e.g.
10+
//! `#[feature(asm_experimental_arch)]`.
911
//!
1012
//! # References
1113
//!
1214
//! This is partially adapted from `rustc_codegen_cranelift`:
1315
//! <https://github.com/rust-lang/rust/blob/c0b5cc9003f6464c11ae1c0662c6a7e06f6f5cab/compiler/rustc_codegen_cranelift/example/mini_core.rs>.
1416
// ignore-tidy-linelength
1517

16-
#![feature(no_core, lang_items, rustc_attrs)]
18+
#![feature(no_core, lang_items, rustc_attrs, decl_macro)]
1719
#![allow(unused, improper_ctypes_definitions, internal_features)]
1820
#![no_std]
1921
#![no_core]
@@ -37,7 +39,9 @@ impl<T: ?Sized> LegacyReceiver for &mut T {}
3739
#[lang = "copy"]
3840
pub trait Copy: Sized {}
3941

40-
impl_marker_trait!(Copy => [ bool, char, isize, usize, i8, i16, i32, i64, u8, u16, u32, u64 ]);
42+
impl_marker_trait!(
43+
Copy => [ bool, char, isize, usize, i8, i16, i32, i64, u8, u16, u32, u64, f32, f64 ]
44+
);
4145
impl<'a, T: ?Sized> Copy for &'a T {}
4246
impl<T: ?Sized> Copy for *const T {}
4347
impl<T: ?Sized> Copy for *mut T {}

0 commit comments

Comments
 (0)