File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change 11#![ feature( global_asm) ]
22#![ feature( lang_items) ]
33#![ warn( rust_2018_idioms) ]
4+ #![ allow( unused_attributes) ]
45#![ no_std]
56
67mod math;
@@ -10,7 +11,8 @@ use core::panic::PanicInfo;
1011pub use crate :: platforms:: * ;
1112
1213/// This is the executable start function, which directly follows the entry point.
13- #[ lang = "start" ]
14+ #[ cfg_attr( not( test) , lang = "start" ) ]
15+ #[ cfg( not( test) ) ]
1416extern "C" fn start < T > ( user_main : fn ( ) -> T , _argc : isize , _argv : * const * const u8 ) -> isize
1517where
1618 T : Termination ,
1921}
2022
2123/// Termination trait required for the start function.
22- #[ lang = "termination" ]
24+ #[ cfg_attr ( not ( test ) , lang = "termination" ) ]
2325trait Termination {
2426 fn report ( self ) -> i32 ;
2527}
@@ -32,7 +34,7 @@ impl Termination for () {
3234}
3335
3436/// This function is called on panic.
35- #[ panic_handler]
37+ #[ cfg_attr ( not ( test ) , panic_handler) ]
3638#[ no_mangle]
3739pub fn panic ( _info : & PanicInfo < ' _ > ) -> ! {
3840 loop { }
You can’t perform that action at this time.
0 commit comments