There was an error while loading. Please reload this page.
1 parent 7e7ccb2 commit 42a44a0Copy full SHA for 42a44a0
1 file changed
library/core/src/panic.rs
@@ -160,14 +160,9 @@ pub macro unreachable_2021 {
160
/// to prevent unwinds. However, note that `extern "C" fn` will automatically
161
/// convert unwinds to aborts, so using this function isn't necessary for FFI.
162
#[unstable(feature = "abort_unwind", issue = "130338")]
163
+#[rustc_nounwind]
164
pub fn abort_unwind<F:FnOnce() -> R,R>(f:F) -> R{
-// This attribute adds the "unwinding out of nounwind function" guard.
165
-#[rustc_nounwind]
166
-fn abort_unwind_inner<F:FnOnce() -> R,R>(f:F) -> R{
167
- f()
168
-}
169
-
170
- abort_unwind_inner(f)
+ f()
171
}
172
173
/// An internal trait used by std to pass data from std to `panic_unwind` and
0 commit comments