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 28
28
//!
29
29
30
30
#![ feature( start) ]
31
- #![ feature( core_intrinsics) ]
32
31
#![ feature( alloc_error_handler) ]
33
32
#![ no_std]
34
33
extern crate libc;
@@ -48,7 +47,6 @@ extern crate wee_alloc;
48
47
static ALLOC : wee_alloc:: WeeAlloc = wee_alloc:: WeeAlloc :: INIT ;
49
48
50
49
use core:: fmt:: { self , Write } ;
51
- use core:: intrinsics;
52
50
use core:: panic:: PanicInfo ;
53
51
54
52
use secp256k1:: ecdh:: { self , SharedSecret } ;
@@ -61,6 +59,10 @@ use serde_cbor::de;
61
59
use serde_cbor:: ser:: SliceWrite ;
62
60
use serde_cbor:: Serializer ;
63
61
62
+ fn abort ( ) -> ! {
63
+ unsafe { libc:: abort ( ) }
64
+ }
65
+
64
66
struct FakeRng ;
65
67
impl RngCore for FakeRng {
66
68
fn next_u32 ( & mut self ) -> u32 {
@@ -157,7 +159,7 @@ impl Write for Print {
157
159
if curr + s. len ( ) > MAX_PRINT {
158
160
unsafe {
159
161
libc:: printf ( "overflow\n \0 " . as_ptr ( ) as _ ) ;
160
- intrinsics :: abort ( ) ;
162
+ abort ( ) ;
161
163
}
162
164
}
163
165
self . loc += s. len ( ) ;
@@ -173,11 +175,11 @@ fn panic(info: &PanicInfo) -> ! {
173
175
let mut buf = Print :: new ( ) ;
174
176
write ! ( & mut buf, "{}" , msg) . unwrap ( ) ;
175
177
buf. print ( ) ;
176
- intrinsics :: abort ( )
178
+ abort ( )
177
179
}
178
180
179
181
#[ alloc_error_handler]
180
182
fn alloc_error ( _layout : Layout ) -> ! {
181
183
unsafe { libc:: printf ( "alloc shi1\n \0 " . as_ptr ( ) as _ ) } ;
182
- intrinsics :: abort ( )
184
+ abort ( )
183
185
}
You can’t perform that action at this time.
0 commit comments