66//!
77//! - `minicore` is **only** intended for `core` items, and the stubs should match the actual `core`
88//! items.
9+ //! - Becareful of adding new features and things that are only available for a subset of targets.
910//!
1011//! # References
1112//!
1213//! This is partially adapted from `rustc_codegen_cranelift`:
1314//! <https://github.com/rust-lang/rust/blob/c0b5cc9003f6464c11ae1c0662c6a7e06f6f5cab/compiler/rustc_codegen_cranelift/example/mini_core.rs>.
1415// ignore-tidy-linelength
1516
16- #![ feature( no_core, lang_items, rustc_attrs) ]
17+ #![ feature( no_core, lang_items, rustc_attrs, decl_macro ) ]
1718#![ allow( unused, improper_ctypes_definitions, internal_features) ]
19+ #![ feature( asm_experimental_arch) ]
1820#![ no_std]
1921#![ no_core]
2022
@@ -37,7 +39,9 @@ impl<T: ?Sized> LegacyReceiver for &mut T {}
3739#[ lang = "copy" ]
3840pub 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+ ) ;
4145impl < ' a , T : ?Sized > Copy for & ' a T { }
4246impl < T : ?Sized > Copy for * const T { }
4347impl < T : ?Sized > Copy for * mut T { }
@@ -70,3 +74,8 @@ impl<T: Copy + ?Sized> Copy for ManuallyDrop<T> {}
7074pub struct UnsafeCell < T : ?Sized > {
7175 value : T ,
7276}
77+
78+ #[ rustc_builtin_macro]
79+ pub macro asm ( "assembly template" , $( operands, ) * $( options ( $( option) , * ) ) ?) {
80+ /* compiler built-in */
81+ }
0 commit comments