File tree Expand file tree Collapse file tree 3 files changed +21
-1
lines changed
Expand file tree Collapse file tree 3 files changed +21
-1
lines changed Original file line number Diff line number Diff line change @@ -1348,6 +1348,11 @@ extern "rust-intrinsic" {
13481348 /// See documentation of `<*const T>::offset_from` for details.
13491349 #[ cfg( not( bootstrap) ) ]
13501350 pub fn ptr_offset_from < T > ( ptr : * const T , base : * const T ) -> isize ;
1351+
1352+ /// Internal hook used by Miri to implement unwinding.
1353+ /// Perma-unstable: do not use
1354+ #[ cfg( not( bootstrap) ) ]
1355+ pub fn miri_start_panic ( data : * mut ( dyn crate :: any:: Any + Send ) ) -> !;
13511356}
13521357
13531358// Some functions are defined here because they accidentally got made
Original file line number Diff line number Diff line change @@ -36,7 +36,10 @@ use core::raw;
3636use core:: panic:: BoxMeUp ;
3737
3838cfg_if:: cfg_if! {
39- if #[ cfg( target_os = "emscripten" ) ] {
39+ if #[ cfg( miri) ] {
40+ #[ path = "miri.rs" ]
41+ mod imp;
42+ } else if #[ cfg( target_os = "emscripten" ) ] {
4043 #[ path = "emcc.rs" ]
4144 mod imp;
4245 } else if #[ cfg( target_arch = "wasm32" ) ] {
Original file line number Diff line number Diff line change 1+ pub fn payload ( ) -> * mut u8 {
2+ core:: ptr:: null_mut ( )
3+ }
4+
5+ pub unsafe fn panic ( data : Box < dyn Any + Send > ) -> u32 {
6+ core:: intrinsics:: miri_start_panic ( Box :: into_raw ( data) )
7+ }
8+
9+ pub unsafe fn cleanup ( ptr : * mut u8 ) -> Box < dyn Any + Send > {
10+ Box :: from_raw ( ptr)
11+ }
12+
You can’t perform that action at this time.
0 commit comments