We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents d64d89e + 7aee08f commit 70e7697Copy full SHA for 70e7697
sdk/src/sys/mod.rs
@@ -156,7 +156,12 @@ macro_rules! fvm_syscalls {
156
}
157
158
syscall($($args),*);
159
- panic!(concat!("syscall ", stringify!($name), " should not have returned"))
+
160
+ // This should be unreachable unless the syscall has a bug. We abort instead of panicing
161
+ // to help the compiler optimize. It has no way of _proving_ that the syscall doesn't
162
+ // return, so this gives it a way to prove that even if the syscall does return, this
163
+ // function won't.
164
+ std::process::abort()
165
166
$crate::sys::fvm_syscalls! {
167
module = $module;
0 commit comments