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 29
29
30
30
#![ feature( start) ]
31
31
#![ feature( core_intrinsics) ]
32
- #![ feature( panic_info_message) ]
33
32
#![ feature( alloc_error_handler) ]
34
33
#![ no_std]
35
34
extern crate libc;
@@ -48,7 +47,7 @@ extern crate wee_alloc;
48
47
#[ global_allocator]
49
48
static ALLOC : wee_alloc:: WeeAlloc = wee_alloc:: WeeAlloc :: INIT ;
50
49
51
- use core:: fmt:: { self , write , Write } ;
50
+ use core:: fmt:: { self , Write } ;
52
51
use core:: intrinsics;
53
52
use core:: panic:: PanicInfo ;
54
53
@@ -170,9 +169,9 @@ impl Write for Print {
170
169
#[ panic_handler]
171
170
fn panic ( info : & PanicInfo ) -> ! {
172
171
unsafe { libc:: printf ( "shi1\n \0 " . as_ptr ( ) as _ ) } ;
173
- let msg = info. message ( ) . unwrap ( ) ;
172
+ let msg = info. message ( ) ;
174
173
let mut buf = Print :: new ( ) ;
175
- write ( & mut buf, * msg) . unwrap ( ) ;
174
+ write ! ( & mut buf, "{}" , msg) . unwrap ( ) ;
176
175
buf. print ( ) ;
177
176
intrinsics:: abort ( )
178
177
}
You can’t perform that action at this time.
0 commit comments