6
6
//!
7
7
//! - `minicore` is **only** intended for `core` items, and the stubs should match the actual `core`
8
8
//! items.
9
+ //! - Becareful of adding new features and things that are only available for a subset of targets.
9
10
//!
10
11
//! # References
11
12
//!
12
13
//! This is partially adapted from `rustc_codegen_cranelift`:
13
14
//! <https://github.com/rust-lang/rust/blob/c0b5cc9003f6464c11ae1c0662c6a7e06f6f5cab/compiler/rustc_codegen_cranelift/example/mini_core.rs>.
14
15
// ignore-tidy-linelength
15
16
16
- #![ feature( no_core, lang_items, rustc_attrs) ]
17
+ #![ feature( no_core, lang_items, rustc_attrs, decl_macro ) ]
17
18
#![ allow( unused, improper_ctypes_definitions, internal_features) ]
19
+ #![ feature( asm_experimental_arch) ]
18
20
#![ no_std]
19
21
#![ no_core]
20
22
@@ -37,7 +39,9 @@ impl<T: ?Sized> LegacyReceiver for &mut T {}
37
39
#[ lang = "copy" ]
38
40
pub trait Copy : Sized { }
39
41
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
+ ) ;
41
45
impl < ' a , T : ?Sized > Copy for & ' a T { }
42
46
impl < T : ?Sized > Copy for * const T { }
43
47
impl < T : ?Sized > Copy for * mut T { }
@@ -70,3 +74,8 @@ impl<T: Copy + ?Sized> Copy for ManuallyDrop<T> {}
70
74
pub struct UnsafeCell < T : ?Sized > {
71
75
value : T ,
72
76
}
77
+
78
+ #[ rustc_builtin_macro]
79
+ pub macro asm ( "assembly template" , $( operands, ) * $( options ( $( option) , * ) ) ?) {
80
+ /* compiler built-in */
81
+ }
0 commit comments