Skip to content

Commit 677f02a

Browse files
Re-add AssertUnwindSafe impl with T: UnwindSafe bound
1 parent 75f0ac0 commit 677f02a

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

library/core/src/panic/unwind_safe.rs

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -311,3 +311,14 @@ impl<S: AsyncIterator> AsyncIterator for AssertUnwindSafe<S> {
311311
self.0.size_hint()
312312
}
313313
}
314+
315+
#[stable(feature = "from_wrapper_impls", since = "CURRENT_RUSTC_VERSION")]
316+
impl<T> From<T> for AssertUnwindSafe<T>
317+
where
318+
T: UnwindSafe,
319+
{
320+
#[inline(always)]
321+
fn from(value: T) -> Self {
322+
Self(value)
323+
}
324+
}

0 commit comments

Comments
 (0)