Skip to content

Commit 7f895d8

Browse files
committed
Add more core stubs to minicore
`f32`, `f64` and `asm!` macro.
1 parent 2ed8e2d commit 7f895d8

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

tests/auxiliary/minicore.rs

+10-2
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,8 @@
1313
//! <https://github.com/rust-lang/rust/blob/c0b5cc9003f6464c11ae1c0662c6a7e06f6f5cab/compiler/rustc_codegen_cranelift/example/mini_core.rs>.
1414
// ignore-tidy-linelength
1515

16-
#![feature(no_core, lang_items, rustc_attrs)]
16+
#![feature(no_core, lang_items, rustc_attrs, decl_macro)]
17+
#![feature(asm_experimental_arch)]
1718
#![allow(unused, improper_ctypes_definitions, internal_features)]
1819
#![no_std]
1920
#![no_core]
@@ -37,7 +38,9 @@ impl<T: ?Sized> LegacyReceiver for &mut T {}
3738
#[lang = "copy"]
3839
pub trait Copy: Sized {}
3940

40-
impl_marker_trait!(Copy => [ bool, char, isize, usize, i8, i16, i32, i64, u8, u16, u32, u64 ]);
41+
impl_marker_trait!(
42+
Copy => [ bool, char, isize, usize, i8, i16, i32, i64, u8, u16, u32, u64, f32, f64 ]
43+
);
4144
impl<'a, T: ?Sized> Copy for &'a T {}
4245
impl<T: ?Sized> Copy for *const T {}
4346
impl<T: ?Sized> Copy for *mut T {}
@@ -70,3 +73,8 @@ impl<T: Copy + ?Sized> Copy for ManuallyDrop<T> {}
7073
pub struct UnsafeCell<T: ?Sized> {
7174
value: T,
7275
}
76+
77+
#[rustc_builtin_macro]
78+
pub macro asm("assembly template", $(operands,)* $(options($(option),*))?) {
79+
/* compiler built-in */
80+
}

0 commit comments

Comments
 (0)