File tree Expand file tree Collapse file tree 2 files changed +9
-4
lines changed Expand file tree Collapse file tree 2 files changed +9
-4
lines changed Original file line number Diff line number Diff line change @@ -39,6 +39,9 @@ cfg_if::cfg_if! {
3939 if #[ cfg( miri) ] {
4040 #[ path = "miri.rs" ]
4141 mod imp;
42+ // Export this at the root of the crate so that Miri
43+ // has a stable palce to look it up
44+ pub use imp:: miri_panic_trampoline;
4245 } else if #[ cfg( target_os = "emscripten" ) ] {
4346 #[ path = "emcc.rs" ]
4447 mod imp;
@@ -98,7 +101,4 @@ pub unsafe extern "C" fn __rust_start_panic(payload: usize) -> u32 {
98101 imp:: panic ( Box :: from_raw ( ( * payload) . box_me_up ( ) ) )
99102}
100103
101- // A dummy helper function for Miri.
102- // Used to push an empty stack frame when we start unwinding
103- #[ cfg( miri) ]
104- pub fn miri_panic_trampoline ( ) { }
104+
Original file line number Diff line number Diff line change @@ -21,3 +21,8 @@ pub unsafe fn cleanup(ptr: *mut u8) -> Box<dyn Any + Send> {
2121fn rust_eh_personality ( ) {
2222 unsafe { core:: intrinsics:: abort ( ) }
2323}
24+
25+ // A dummy helper function for Miri.
26+ // Used to push an empty stack frame when we start unwinding
27+ #[ cfg( miri) ]
28+ pub fn miri_panic_trampoline ( ) { }
You can’t perform that action at this time.
0 commit comments