Skip to content

Commit 7e1d6e6

Browse files
committed
std: make LazilyResolvedCapture unwind-safe to preserve rust-lang#114331 after revert of rust-lang#109075
1 parent 948bef6 commit 7e1d6e6

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

library/std/src/backtrace.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ use crate::cell::UnsafeCell;
9393
use crate::env;
9494
use crate::ffi::c_void;
9595
use crate::fmt;
96-
use crate::panic::UnwindSafe;
96+
use crate::panic::{RefUnwindSafe, UnwindSafe};
9797
use crate::sync::atomic::{AtomicUsize, Ordering::Relaxed};
9898
use crate::sync::Once;
9999
use crate::sys_common::backtrace::{lock, output_filename};
@@ -458,6 +458,9 @@ impl LazilyResolvedCapture {
458458
// So long as `Capture` is `Sync`, `LazilyResolvedCapture` is too
459459
unsafe impl Sync for LazilyResolvedCapture where Capture: Sync {}
460460

461+
impl UnwindSafe for LazilyResolvedCapture {}
462+
impl RefUnwindSafe for LazilyResolvedCapture {}
463+
461464
impl Capture {
462465
fn resolve(&mut self) {
463466
// If we're already resolved, nothing to do!

0 commit comments

Comments
 (0)