summaryrefslogtreecommitdiff
path: root/library/std/src/sync/lazy_lock
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2024-09-30 23:23:40 +0000
committerbors <bors@rust-lang.org>2024-09-30 23:23:40 +0000
commitc87004a1f5be671e3f03f69fb13d8915bdbb6a52 (patch)
tree2d86795a8614bdfb1d64a2f3281d61669dad0d5a /library/std/src/sync/lazy_lock
parentfb4aebddd18d258046ddb51fd41589295259a0fa (diff)
parenta0637597b4fd169118bc794363474ef4d5d06e1d (diff)
Auto merge of #131078 - tgross35:rollup-66to2u9, r=tgross35
Rollup of 5 pull requests Successful merges: - #129638 (Hook up std::net to wasi-libc on wasm32-wasip2 target) - #130877 (rustc_target: Add RISC-V atomic-related features) - #130914 (Mark some more types as having insignificant dtor) - #130961 (Enable `f16` tests on x86 Apple platforms) - #130966 (make ptr metadata functions callable from stable const fn) r? `@ghost` `@rustbot` modify labels: rollup
Diffstat (limited to 'library/std/src/sync/lazy_lock')
-rw-r--r--library/std/src/sync/lazy_lock/tests.rs6
1 files changed, 4 insertions, 2 deletions
diff --git a/library/std/src/sync/lazy_lock/tests.rs b/library/std/src/sync/lazy_lock/tests.rs
index 94044368305..7d7dde54349 100644
--- a/library/std/src/sync/lazy_lock/tests.rs
+++ b/library/std/src/sync/lazy_lock/tests.rs
@@ -34,6 +34,7 @@ fn lazy_default() {
}
#[test]
+#[cfg_attr(not(panic = "unwind"), ignore = "test requires unwinding support")]
fn lazy_poisoning() {
let x: LazyCell<String> = LazyCell::new(|| panic!("kaboom"));
for _ in 0..2 {
@@ -43,7 +44,7 @@ fn lazy_poisoning() {
}
#[test]
-#[cfg_attr(target_os = "emscripten", ignore)]
+#[cfg_attr(any(target_os = "emscripten", target_os = "wasi"), ignore)] // no threads
fn sync_lazy_new() {
static CALLED: AtomicUsize = AtomicUsize::new(0);
static SYNC_LAZY: LazyLock<i32> = LazyLock::new(|| {
@@ -90,7 +91,7 @@ fn sync_lazy_default() {
}
#[test]
-#[cfg_attr(target_os = "emscripten", ignore)]
+#[cfg_attr(any(target_os = "emscripten", target_os = "wasi"), ignore)] // no threads
fn static_sync_lazy() {
static XS: LazyLock<Vec<i32>> = LazyLock::new(|| {
let mut xs = Vec::new();
@@ -123,6 +124,7 @@ fn static_sync_lazy_via_fn() {
}
#[test]
+#[cfg_attr(not(panic = "unwind"), ignore = "test requires unwinding support")]
fn sync_lazy_poisoning() {
let x: LazyLock<String> = LazyLock::new(|| panic!("kaboom"));
for _ in 0..2 {