Move to miri.rs and re-export it
This commit is contained in:
parent
72b555c160
commit
23900770ab
@ -39,6 +39,9 @@
|
||||
if #[cfg(miri)] {
|
||||
#[path = "miri.rs"]
|
||||
mod imp;
|
||||
// Export this at the root of the crate so that Miri
|
||||
// has a stable palce to look it up
|
||||
pub use imp::miri_panic_trampoline;
|
||||
} else if #[cfg(target_os = "emscripten")] {
|
||||
#[path = "emcc.rs"]
|
||||
mod imp;
|
||||
@ -98,7 +101,4 @@
|
||||
imp::panic(Box::from_raw((*payload).box_me_up()))
|
||||
}
|
||||
|
||||
// A dummy helper function for Miri.
|
||||
// Used to push an empty stack frame when we start unwinding
|
||||
#[cfg(miri)]
|
||||
pub fn miri_panic_trampoline() {}
|
||||
|
||||
|
@ -21,3 +21,8 @@ pub unsafe fn cleanup(ptr: *mut u8) -> Box<dyn Any + Send> {
|
||||
fn rust_eh_personality() {
|
||||
unsafe { core::intrinsics::abort() }
|
||||
}
|
||||
|
||||
// A dummy helper function for Miri.
|
||||
// Used to push an empty stack frame when we start unwinding
|
||||
#[cfg(miri)]
|
||||
pub fn miri_panic_trampoline() {}
|
||||
|
Loading…
Reference in New Issue
Block a user