We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 9c71d4e commit f396849Copy full SHA for f396849
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