File tree Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Original file line number Diff line number Diff line change 2929
3030#![ feature( start) ]
3131#![ feature( core_intrinsics) ]
32- #![ feature( panic_info_message) ]
3332#![ feature( alloc_error_handler) ]
3433#![ no_std]
3534extern crate libc;
@@ -48,7 +47,7 @@ extern crate wee_alloc;
4847#[ global_allocator]
4948static ALLOC : wee_alloc:: WeeAlloc = wee_alloc:: WeeAlloc :: INIT ;
5049
51- use core:: fmt:: { self , write , Write } ;
50+ use core:: fmt:: { self , Write } ;
5251use core:: intrinsics;
5352use core:: panic:: PanicInfo ;
5453
@@ -170,9 +169,9 @@ impl Write for Print {
170169#[ panic_handler]
171170fn panic ( info : & PanicInfo ) -> ! {
172171 unsafe { libc:: printf ( "shi1\n \0 " . as_ptr ( ) as _ ) } ;
173- let msg = info. message ( ) . unwrap ( ) ;
172+ let msg = info. message ( ) ;
174173 let mut buf = Print :: new ( ) ;
175- write ( & mut buf, * msg) . unwrap ( ) ;
174+ write ! ( & mut buf, "{}" , msg) . unwrap ( ) ;
176175 buf. print ( ) ;
177176 intrinsics:: abort ( )
178177}
You can’t perform that action at this time.
0 commit comments