We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 20d0225 commit 30fd32eCopy full SHA for 30fd32e
library/std/tests/sync/barrier.rs
@@ -35,11 +35,10 @@ fn test_barrier() {
35
assert!(leader_found);
36
}
37
38
-#[expect(dead_code, reason = "this is essentially a compile pass test")]
39
-fn check_barrier_is_ref_unwind_safe() {
40
- let barrier = Arc::new(Barrier::new(10));
41
-
42
- fn check<T: RefUnwindSafe>(_: T) {}
43
44
- check(barrier);
45
-}
+/// Asserts that `Barrier` is ref unwind safe.
+///
+/// See <https://github.com/rust-lang/rust/issues/146087>.
+const _: () = {
+ const fn check_ref_unwind_safe<T: RefUnwindSafe>() {}
+ check_ref_unwind_safe::<Barrier>();
+};
0 commit comments