File tree Expand file tree Collapse file tree 1 file changed +7
-5
lines changed Expand file tree Collapse file tree 1 file changed +7
-5
lines changed Original file line number Diff line number Diff line change 2828//!
2929
3030#![ feature( start) ]
31- #![ feature( core_intrinsics) ]
3231#![ feature( alloc_error_handler) ]
3332#![ no_std]
3433extern crate libc;
@@ -48,7 +47,6 @@ extern crate wee_alloc;
4847static ALLOC : wee_alloc:: WeeAlloc = wee_alloc:: WeeAlloc :: INIT ;
4948
5049use core:: fmt:: { self , Write } ;
51- use core:: intrinsics;
5250use core:: panic:: PanicInfo ;
5351
5452use secp256k1:: ecdh:: { self , SharedSecret } ;
@@ -61,6 +59,10 @@ use serde_cbor::de;
6159use serde_cbor:: ser:: SliceWrite ;
6260use serde_cbor:: Serializer ;
6361
62+ fn abort ( ) -> ! {
63+ unsafe { libc:: abort ( ) }
64+ }
65+
6466struct FakeRng ;
6567impl RngCore for FakeRng {
6668 fn next_u32 ( & mut self ) -> u32 {
@@ -157,7 +159,7 @@ impl Write for Print {
157159 if curr + s. len ( ) > MAX_PRINT {
158160 unsafe {
159161 libc:: printf ( "overflow\n \0 " . as_ptr ( ) as _ ) ;
160- intrinsics :: abort ( ) ;
162+ abort ( ) ;
161163 }
162164 }
163165 self . loc += s. len ( ) ;
@@ -173,11 +175,11 @@ fn panic(info: &PanicInfo) -> ! {
173175 let mut buf = Print :: new ( ) ;
174176 write ! ( & mut buf, "{}" , msg) . unwrap ( ) ;
175177 buf. print ( ) ;
176- intrinsics :: abort ( )
178+ abort ( )
177179}
178180
179181#[ alloc_error_handler]
180182fn alloc_error ( _layout : Layout ) -> ! {
181183 unsafe { libc:: printf ( "alloc shi1\n \0 " . as_ptr ( ) as _ ) } ;
182- intrinsics :: abort ( )
184+ abort ( )
183185}
You can’t perform that action at this time.
0 commit comments