]> git.lizzy.rs Git - rust.git/blob - src/libpanic_unwind/payload.rs
Apply review feedback
[rust.git] / src / libpanic_unwind / payload.rs
1 // Type definition for the payload argument of the try intrinsic.
2 //
3 // This must be kept in sync with the implementations of the try intrinsic.
4 //
5 // This file is included by both panic runtimes and libstd. It is part of the
6 // panic runtime ABI.
7 cfg_if::cfg_if! {
8     if #[cfg(target_os = "emscripten")] {
9         type TryPayload = *mut u8;
10     } else if #[cfg(target_arch = "wasm32")] {
11         type TryPayload = *mut u8;
12     } else if #[cfg(target_os = "hermit")] {
13         type TryPayload = *mut u8;
14     } else if #[cfg(all(target_env = "msvc", target_arch = "aarch64"))] {
15         type TryPayload = *mut u8;
16     } else if #[cfg(target_env = "msvc")] {
17         type TryPayload = [u64; 2];
18     } else {
19         type TryPayload = *mut u8;
20     }
21 }