Skip to content

Commit a85e414

Browse files
committed
Add more autotraits tests
1 parent 139f266 commit a85e414

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

tests/test_autotrait.rs

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
#![allow(clippy::extra_unused_type_parameters)]
22

33
use anyhow::Error;
4+
use std::panic::{RefUnwindSafe, UnwindSafe};
45

56
#[test]
67
fn test_send() {
@@ -13,3 +14,21 @@ fn test_sync() {
1314
fn assert_sync<T: Sync>() {}
1415
assert_sync::<Error>();
1516
}
17+
18+
#[test]
19+
fn test_unwind_safe() {
20+
fn assert_unwind_safe<T: UnwindSafe>() {}
21+
assert_unwind_safe::<Error>();
22+
}
23+
24+
#[test]
25+
fn test_ref_unwind_safe() {
26+
fn assert_ref_unwind_safe<T: RefUnwindSafe>() {}
27+
assert_ref_unwind_safe::<Error>();
28+
}
29+
30+
#[test]
31+
fn test_unpin() {
32+
fn assert_unpin<T: Unpin>() {}
33+
assert_unpin::<Error>();
34+
}

0 commit comments

Comments
 (0)