Rollup merge of #122109 - alexcrichton:compiletests-needs-threads, r=workingjubilee
compiletest: Add a `//@ needs-threads` directive This commit is extracted from #122036 and adds a new directive to the `compiletest` test runner, `//@ needs-threads`. This is intended to capture the need that a target must implement threading to execute a specific test, typically one that uses `std::thread`. This is primarily done for WebAssembly targets which currently do not have threads by default. This enables transitioning a lot of `//@ ignore-wasm*`-style ignores into a more self-documenting `//@ needs-threads` directive. Additionally the `wasm32-wasi-preview1-threads` target, for example, does actually have threads, but isn't tested in CI at this time. This change enables running these tests for that target, but not other wasm targets.
This commit is contained in:
commit
5642b04186
@ -451,6 +451,15 @@ pub fn can_unwind(&self) -> bool {
|
||||
self.target_cfg().panic == PanicStrategy::Unwind
|
||||
}
|
||||
|
||||
pub fn has_threads(&self) -> bool {
|
||||
// Wasm targets don't have threads unless `-threads` is in the target
|
||||
// name, such as `wasm32-wasip1-threads`.
|
||||
if self.target.starts_with("wasm") {
|
||||
return self.target.contains("threads");
|
||||
}
|
||||
true
|
||||
}
|
||||
|
||||
pub fn has_asm_support(&self) -> bool {
|
||||
static ASM_SUPPORTED_ARCHS: &[&str] = &[
|
||||
"x86", "x86_64", "arm", "aarch64", "riscv32",
|
||||
|
@ -787,6 +787,7 @@ pub fn line_directive<'line>(
|
||||
"needs-sanitizer-shadow-call-stack",
|
||||
"needs-sanitizer-support",
|
||||
"needs-sanitizer-thread",
|
||||
"needs-threads",
|
||||
"needs-unwind",
|
||||
"needs-xray",
|
||||
"no-prefer-dynamic",
|
||||
|
@ -84,6 +84,11 @@ pub(super) fn handle_needs(
|
||||
condition: config.run_enabled(),
|
||||
ignore_reason: "ignored when running the resulting test binaries is disabled",
|
||||
},
|
||||
Need {
|
||||
name: "needs-threads",
|
||||
condition: config.has_threads(),
|
||||
ignore_reason: "ignored on targets without threading support",
|
||||
},
|
||||
Need {
|
||||
name: "needs-unwind",
|
||||
condition: config.can_unwind(),
|
||||
|
@ -592,3 +592,23 @@ fn ignore_mode() {
|
||||
assert!(!check_ignore(&config, &format!("//@ ignore-mode-{other}")));
|
||||
}
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn threads_support() {
|
||||
let threads = [
|
||||
("x86_64-unknown-linux-gnu", true),
|
||||
("aarch64-apple-darwin", true),
|
||||
("wasm32-unknown-unknown", false),
|
||||
("wasm64-unknown-unknown", false),
|
||||
#[cfg(not(bootstrap))]
|
||||
("wasm32-wasip1", false),
|
||||
#[cfg(not(bootstrap))]
|
||||
("wasm32-wasip1-threads", true),
|
||||
("wasm32-wasi-preview1-threads", true),
|
||||
];
|
||||
for (target, has_threads) in threads {
|
||||
let config = cfg().target(target).build();
|
||||
assert_eq!(config.has_threads(), has_threads);
|
||||
assert_eq!(check_ignore(&config, "//@ needs-threads"), !has_threads)
|
||||
}
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
//@ ignore-wasm32-bare compiled with panic=abort by default
|
||||
//@ needs-unwind
|
||||
//@ compile-flags: -C no-prepopulate-passes -Copt-level=0
|
||||
//
|
||||
|
||||
|
2
tests/ui/abi/extern/extern-call-deep2.rs
vendored
2
tests/ui/abi/extern/extern-call-deep2.rs
vendored
@ -1,6 +1,6 @@
|
||||
//@ run-pass
|
||||
#![allow(unused_must_use)]
|
||||
//@ ignore-emscripten no threads support
|
||||
//@ needs-threads
|
||||
#![feature(rustc_private)]
|
||||
|
||||
extern crate libc;
|
||||
|
2
tests/ui/abi/extern/extern-call-scrub.rs
vendored
2
tests/ui/abi/extern/extern-call-scrub.rs
vendored
@ -4,7 +4,7 @@
|
||||
// make sure the stack pointers are maintained properly in both
|
||||
// directions
|
||||
|
||||
//@ ignore-emscripten no threads support
|
||||
//@ needs-threads
|
||||
#![feature(rustc_private)]
|
||||
|
||||
extern crate libc;
|
||||
|
@ -1,5 +1,5 @@
|
||||
//@ run-pass
|
||||
//@ ignore-emscripten no threads support
|
||||
//@ needs-threads
|
||||
|
||||
#![feature(rustc_private)]
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
//@ run-pass
|
||||
#![allow(unused_must_use)]
|
||||
//@ ignore-emscripten no threads support
|
||||
//@ needs-threads
|
||||
|
||||
use std::sync::mpsc::{channel, Sender};
|
||||
use std::thread;
|
||||
|
@ -7,8 +7,7 @@
|
||||
// optimisation.
|
||||
|
||||
//@ pretty-expanded FIXME #23616
|
||||
//@ ignore-emscripten no threads support
|
||||
|
||||
//@ needs-threads
|
||||
#![feature(intrinsics)]
|
||||
|
||||
use std::{mem, thread};
|
||||
|
@ -1,5 +1,5 @@
|
||||
//@ run-pass
|
||||
//@ ignore-emscripten no threads
|
||||
//@ needs-threads
|
||||
//@ compile-flags: -O
|
||||
|
||||
// Tests that the `vec!` macro does not overflow the stack when it is
|
||||
|
@ -3,7 +3,7 @@
|
||||
//@ revisions: default nomiropt
|
||||
//@[nomiropt]compile-flags: -Z mir-opt-level=0
|
||||
|
||||
//@ ignore-emscripten no threads support
|
||||
//@ needs-threads
|
||||
//@ compile-flags: --test
|
||||
|
||||
#![feature(coroutines, coroutine_trait)]
|
||||
|
@ -5,7 +5,7 @@
|
||||
// that use capture clauses.
|
||||
|
||||
//@ pretty-expanded FIXME #23616
|
||||
//@ ignore-emscripten no threads support
|
||||
//@ needs-threads
|
||||
|
||||
extern crate cci_capture_clause;
|
||||
|
||||
|
@ -4,7 +4,7 @@
|
||||
#![allow(non_camel_case_types)]
|
||||
#![allow(dead_code)]
|
||||
#![allow(unused_mut)]
|
||||
//@ ignore-emscripten No support for threads
|
||||
//@ needs-threads
|
||||
|
||||
/**
|
||||
A somewhat reduced test case to expose some Valgrind issues.
|
||||
|
@ -1,6 +1,6 @@
|
||||
//@ run-pass
|
||||
#![allow(unused_variables)]
|
||||
//@ ignore-emscripten no threads support
|
||||
//@ needs-threads
|
||||
|
||||
use std::thread;
|
||||
use std::mem;
|
||||
|
@ -1,5 +1,5 @@
|
||||
//@ run-pass
|
||||
//@ ignore-emscripten no threads support
|
||||
//@ needs-threads
|
||||
|
||||
// Regression test for unwrapping the result of `join`, issue #21291
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
//@ run-pass
|
||||
//@ ignore-emscripten no threads support
|
||||
//@ needs-threads
|
||||
|
||||
pub fn main() {
|
||||
let f = || || 0;
|
||||
|
@ -1,6 +1,6 @@
|
||||
//@ edition:2018
|
||||
//@ run-pass
|
||||
//@ ignore-emscripten no threads support
|
||||
//@ needs-threads
|
||||
|
||||
use std::thread;
|
||||
use std::time::Duration;
|
||||
|
@ -1,6 +1,6 @@
|
||||
//@ run-pass
|
||||
//@ ignore-windows
|
||||
//@ ignore-emscripten no threads support
|
||||
//@ needs-threads
|
||||
|
||||
use std::cell::Cell;
|
||||
use std::fmt;
|
||||
|
@ -1,7 +1,7 @@
|
||||
//@ run-pass
|
||||
//@ compile-flags: -C lto
|
||||
//@ no-prefer-dynamic
|
||||
//@ ignore-emscripten no threads support
|
||||
//@ needs-threads
|
||||
|
||||
use std::thread;
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
//@ run-pass
|
||||
#![allow(unused_must_use)]
|
||||
//@ ignore-emscripten no threads support
|
||||
//@ needs-threads
|
||||
|
||||
use std::thread;
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
//@ run-pass
|
||||
#![allow(unused_must_use)]
|
||||
//@ ignore-emscripten no threads support
|
||||
//@ needs-threads
|
||||
|
||||
use std::thread;
|
||||
|
||||
|
@ -1,9 +1,8 @@
|
||||
//@ run-pass
|
||||
//@ needs-unwind
|
||||
//@ needs-threads
|
||||
#![allow(stable_features)]
|
||||
|
||||
//@ ignore-emscripten no threads support
|
||||
|
||||
#![feature(std_panic)]
|
||||
|
||||
use std::sync::atomic::{AtomicUsize, Ordering};
|
||||
|
@ -1,7 +1,7 @@
|
||||
//@ run-fail
|
||||
//@ error-pattern:thread '<unnamed>' panicked
|
||||
//@ error-pattern:test
|
||||
//@ ignore-emscripten Needs threads
|
||||
//@ needs-threads
|
||||
|
||||
use std::thread;
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
//@ run-fail
|
||||
//@ error-pattern:thread 'owned name' panicked
|
||||
//@ error-pattern:test
|
||||
//@ ignore-emscripten Needs threads.
|
||||
//@ needs-threads
|
||||
|
||||
use std::thread::Builder;
|
||||
|
||||
|
@ -2,7 +2,7 @@
|
||||
// https://github.com/fortanix/rust-sgx/issues/109
|
||||
|
||||
//@ run-pass
|
||||
//@ ignore-emscripten no threads support
|
||||
//@ needs-threads
|
||||
|
||||
use std::{net::TcpListener, sync::mpsc, thread};
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
// program should terminate when std::process::exit is called from any thread
|
||||
|
||||
//@ run-pass
|
||||
//@ ignore-emscripten no threads support
|
||||
//@ needs-threads
|
||||
|
||||
use std::{process, thread};
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
//@ run-pass
|
||||
#![allow(unused_must_use)]
|
||||
//@ ignore-emscripten no threads support
|
||||
//@ needs-threads
|
||||
|
||||
use std::thread;
|
||||
use std::sync::mpsc::{channel, Sender};
|
||||
|
@ -3,7 +3,7 @@
|
||||
//@ run-flags: --test-threads=1 test1 test2
|
||||
//@ check-run-results
|
||||
//@ normalize-stdout-test "finished in \d+\.\d+s" -> "finished in $$TIME"
|
||||
//@ ignore-emscripten no threads support
|
||||
//@ needs-threads
|
||||
|
||||
#[test]
|
||||
fn test1() {}
|
||||
|
@ -2,7 +2,7 @@
|
||||
//@ run-flags: --test-threads=1
|
||||
//@ check-run-results
|
||||
//@ normalize-stdout-test "finished in \d+\.\d+s" -> "finished in $$TIME"
|
||||
//@ ignore-emscripten no threads support
|
||||
//@ needs-threads
|
||||
//@ run-pass
|
||||
|
||||
#[test]
|
||||
|
@ -1,5 +1,5 @@
|
||||
//@ run-pass
|
||||
//@ ignore-emscripten no threads support
|
||||
//@ needs-threads
|
||||
//@ compile-flags: -O
|
||||
//@ ignore-nto Doesn't work without emulated TLS enabled (in LLVM)
|
||||
|
||||
|
@ -2,7 +2,7 @@
|
||||
// Reported as issue #126, child leaks the string.
|
||||
|
||||
//@ pretty-expanded FIXME #23616
|
||||
//@ ignore-emscripten no threads support
|
||||
//@ needs-threads
|
||||
|
||||
use std::thread;
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
//@ run-pass
|
||||
|
||||
#![allow(unused_must_use)]
|
||||
//@ ignore-emscripten no threads support
|
||||
//@ needs-threads
|
||||
|
||||
use std::thread;
|
||||
|
||||
|
@ -1,13 +1,13 @@
|
||||
//@ run-pass
|
||||
#![allow(unused_must_use)]
|
||||
//@ ignore-emscripten no threads support
|
||||
//@ needs-threads
|
||||
|
||||
use std::thread;
|
||||
use std::sync::mpsc::{channel, Sender};
|
||||
|
||||
pub fn main() {
|
||||
let (tx, rx) = channel();
|
||||
let t = thread::spawn(move|| { child(&tx) });
|
||||
let t = thread::spawn(move || { child(&tx) });
|
||||
let y = rx.recv().unwrap();
|
||||
println!("received");
|
||||
println!("{}", y);
|
||||
|
@ -1,5 +1,5 @@
|
||||
//@ run-pass
|
||||
//@ ignore-emscripten no processes
|
||||
//@ needs-threads
|
||||
//@ ignore-sgx no processes
|
||||
|
||||
use std::cell::RefCell;
|
||||
|
@ -1,5 +1,5 @@
|
||||
//@ run-pass
|
||||
//@ ignore-emscripten no threads
|
||||
//@ needs-threads
|
||||
//@ ignore-sgx no processes
|
||||
|
||||
use std::thread;
|
||||
|
@ -1,5 +1,5 @@
|
||||
//@ run-pass
|
||||
//@ ignore-emscripten no threads support
|
||||
//@ needs-threads
|
||||
|
||||
use std::thread;
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
//@ ignore-wasm32
|
||||
//@ needs-threads
|
||||
//@ dont-check-compiler-stderr
|
||||
#![feature(cfg_target_thread_local, thread_local_internals)]
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
//@ ignore-wasm32
|
||||
//@ needs-threads
|
||||
#![feature(thread_local)]
|
||||
#![feature(cfg_target_thread_local, thread_local_internals)]
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
//@ run-pass
|
||||
//@ ignore-emscripten no threads support
|
||||
//@ needs-threads
|
||||
|
||||
use std::sync::mpsc::channel;
|
||||
use std::thread;
|
||||
|
@ -1,5 +1,5 @@
|
||||
//@ run-pass
|
||||
//@ ignore-emscripten no threads support
|
||||
//@ needs-threads
|
||||
|
||||
use std::sync::mpsc::channel;
|
||||
use std::thread;
|
||||
|
@ -1,5 +1,5 @@
|
||||
//@ run-pass
|
||||
//@ ignore-emscripten no threads support
|
||||
//@ needs-threads
|
||||
|
||||
use std::thread;
|
||||
use std::sync::mpsc::{channel, Receiver};
|
||||
|
@ -1,7 +1,7 @@
|
||||
//@ run-pass
|
||||
#![allow(unused_must_use)]
|
||||
#![allow(deprecated)]
|
||||
//@ ignore-emscripten no threads support
|
||||
//@ needs-threads
|
||||
|
||||
use std::sync::mpsc::{TryRecvError, channel};
|
||||
use std::thread;
|
||||
|
@ -1,6 +1,6 @@
|
||||
//@ run-pass
|
||||
//@ compile-flags:--test
|
||||
//@ ignore-emscripten
|
||||
//@ needs-threads
|
||||
|
||||
use std::sync::mpsc::channel;
|
||||
use std::sync::mpsc::TryRecvError;
|
||||
|
@ -4,7 +4,7 @@
|
||||
#![allow(non_camel_case_types)]
|
||||
|
||||
//@ pretty-expanded FIXME #23616
|
||||
//@ ignore-emscripten no threads support
|
||||
//@ needs-threads
|
||||
|
||||
use std::thread;
|
||||
use std::sync::mpsc::channel;
|
||||
|
@ -1,5 +1,5 @@
|
||||
//@ run-pass
|
||||
//@ ignore-emscripten no threads support
|
||||
//@ needs-threads
|
||||
|
||||
use std::thread;
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
//@ run-pass
|
||||
#![allow(unused_must_use)]
|
||||
//@ ignore-emscripten no threads support
|
||||
//@ needs-threads
|
||||
|
||||
use std::thread;
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
//@ run-pass
|
||||
#![allow(non_camel_case_types)]
|
||||
|
||||
//@ ignore-emscripten no threads support
|
||||
//@ needs-threads
|
||||
|
||||
/*
|
||||
Make sure we can spawn tasks that take different types of
|
||||
|
@ -1,5 +1,5 @@
|
||||
//@ run-pass
|
||||
//@ ignore-emscripten no threads support
|
||||
//@ needs-threads
|
||||
|
||||
use std::thread;
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
//@ run-pass
|
||||
//@ ignore-emscripten no threads support
|
||||
//@ needs-threads
|
||||
|
||||
use std::thread;
|
||||
|
||||
|
@ -3,7 +3,7 @@
|
||||
#![allow(unused_mut)]
|
||||
//@ ignore-windows
|
||||
//@ exec-env:RUST_LOG=debug
|
||||
//@ ignore-emscripten no threads support
|
||||
//@ needs-threads
|
||||
|
||||
// regression test for issue #10405, make sure we don't call println! too soon.
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
//@ run-pass
|
||||
#![allow(unused_must_use)]
|
||||
//@ ignore-emscripten no threads support
|
||||
//@ needs-threads
|
||||
|
||||
use std::thread;
|
||||
use std::sync::mpsc::{channel, Sender};
|
||||
|
@ -1,6 +1,6 @@
|
||||
//@ run-pass
|
||||
#![allow(unused_must_use)]
|
||||
//@ ignore-emscripten no threads support
|
||||
//@ needs-threads
|
||||
|
||||
use std::thread;
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
//@ run-pass
|
||||
#![allow(unused_must_use)]
|
||||
#![allow(unused_mut)]
|
||||
//@ ignore-emscripten no threads support
|
||||
//@ needs-threads
|
||||
|
||||
use std::thread;
|
||||
use std::sync::mpsc::{channel, Sender};
|
||||
|
@ -1,7 +1,7 @@
|
||||
//@ run-pass
|
||||
#![allow(unused_must_use)]
|
||||
//@ pretty-expanded FIXME #23616
|
||||
//@ ignore-emscripten no threads support
|
||||
//@ needs-threads
|
||||
|
||||
use std::sync::mpsc::{channel, Sender};
|
||||
use std::thread;
|
||||
|
@ -1,7 +1,7 @@
|
||||
//@ run-pass
|
||||
#![allow(unused_must_use)]
|
||||
#![allow(unused_mut)]
|
||||
//@ ignore-emscripten no threads support
|
||||
//@ needs-threads
|
||||
|
||||
use std::thread;
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
//@ run-pass
|
||||
#![allow(unused_variables)]
|
||||
//@ ignore-emscripten no threads support
|
||||
//@ needs-threads
|
||||
|
||||
use std::sync::mpsc::{channel, Sender};
|
||||
use std::thread;
|
||||
|
@ -1,6 +1,6 @@
|
||||
//@ run-pass
|
||||
#![allow(unused_parens)]
|
||||
//@ ignore-emscripten no threads support
|
||||
//@ needs-threads
|
||||
|
||||
use std::sync::mpsc::{channel, Sender};
|
||||
use std::thread;
|
||||
|
@ -1,6 +1,6 @@
|
||||
//@ run-pass
|
||||
#![allow(unused_must_use)]
|
||||
//@ ignore-emscripten no threads support
|
||||
//@ needs-threads
|
||||
//@ pretty-expanded FIXME #23616
|
||||
|
||||
use std::sync::mpsc::{channel, Sender};
|
||||
|
@ -1,6 +1,6 @@
|
||||
//@ run-pass
|
||||
#![allow(unused_must_use)]
|
||||
//@ ignore-emscripten no threads support
|
||||
//@ needs-threads
|
||||
//@ pretty-expanded FIXME #23616
|
||||
|
||||
// Issue #922
|
||||
|
@ -1,6 +1,6 @@
|
||||
//@ run-pass
|
||||
#![allow(unused_must_use)]
|
||||
//@ ignore-emscripten no threads support
|
||||
//@ needs-threads
|
||||
|
||||
use std::thread;
|
||||
use std::sync::mpsc::{channel, Sender};
|
||||
|
@ -1,7 +1,7 @@
|
||||
//@ run-pass
|
||||
#![allow(unused_must_use)]
|
||||
#![allow(unused_assignments)]
|
||||
//@ ignore-emscripten no threads support
|
||||
//@ needs-threads
|
||||
|
||||
use std::sync::mpsc::{channel, Sender};
|
||||
use std::thread;
|
||||
|
@ -1,6 +1,6 @@
|
||||
//@ run-pass
|
||||
#![allow(unused_must_use)]
|
||||
//@ ignore-emscripten no threads support
|
||||
//@ needs-threads
|
||||
|
||||
use std::thread;
|
||||
use std::sync::mpsc::{channel, Sender};
|
||||
|
@ -1,6 +1,6 @@
|
||||
//@ run-pass
|
||||
#![allow(unused_must_use)]
|
||||
//@ ignore-emscripten no threads support
|
||||
//@ needs-threads
|
||||
//@ pretty-expanded FIXME #23616
|
||||
|
||||
use std::thread;
|
||||
|
@ -1,6 +1,6 @@
|
||||
//@ run-fail
|
||||
//@ error-pattern:Ensure that the child thread runs by panicking
|
||||
//@ ignore-emscripten Needs threads.
|
||||
//@ needs-threads
|
||||
|
||||
use std::thread;
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
//@ run-pass
|
||||
#![allow(unused_must_use)]
|
||||
//@ ignore-emscripten no threads support
|
||||
//@ needs-threads
|
||||
|
||||
use std::thread;
|
||||
use std::sync::mpsc::channel;
|
||||
|
@ -1,5 +1,5 @@
|
||||
//@ run-pass
|
||||
//@ ignore-emscripten no threads support
|
||||
//@ needs-threads
|
||||
//@ needs-unwind
|
||||
|
||||
#![feature(internal_output_capture)]
|
||||
|
@ -1,6 +1,6 @@
|
||||
//@ run-pass
|
||||
//@ ignore-android needs extra network permissions
|
||||
//@ ignore-emscripten no threads or sockets support
|
||||
//@ needs-threads
|
||||
//@ ignore-netbsd system ulimit (Too many open files)
|
||||
//@ ignore-openbsd system ulimit (Too many open files)
|
||||
|
||||
|
@ -5,7 +5,7 @@
|
||||
//@ error-pattern:should be a positive integer
|
||||
//@ compile-flags: --test
|
||||
//@ exec-env:RUST_TEST_THREADS=foo
|
||||
//@ ignore-emscripten
|
||||
//@ needs-threads
|
||||
|
||||
#[test]
|
||||
fn do_nothing() {}
|
||||
|
@ -1,6 +1,6 @@
|
||||
//@ run-pass
|
||||
#![allow(unused_must_use)]
|
||||
//@ ignore-emscripten no threads support
|
||||
//@ needs-threads
|
||||
|
||||
use std::thread;
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
//@ run-pass
|
||||
//@ no-prefer-dynamic
|
||||
//@ ignore-emscripten no threads support
|
||||
//@ needs-threads
|
||||
|
||||
static mut HIT: bool = false;
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
//@ run-pass
|
||||
#![allow(stable_features)]
|
||||
|
||||
//@ ignore-emscripten no threads support
|
||||
//@ needs-threads
|
||||
|
||||
#![feature(thread_local_try_with)]
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
//@ run-pass
|
||||
#![allow(stable_features)]
|
||||
|
||||
//@ ignore-emscripten no threads support
|
||||
//@ needs-threads
|
||||
|
||||
#![feature(thread_local_try_with)]
|
||||
|
||||
|
@ -2,7 +2,7 @@
|
||||
//@ needs-unwind
|
||||
|
||||
#![allow(non_camel_case_types)]
|
||||
//@ ignore-emscripten no threads support
|
||||
//@ needs-threads
|
||||
|
||||
use std::sync::mpsc::{channel, Sender};
|
||||
use std::thread;
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
#![allow(unused_must_use)]
|
||||
#![allow(unused_mut)]
|
||||
//@ ignore-emscripten no threads support
|
||||
//@ needs-threads
|
||||
|
||||
use std::thread;
|
||||
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
#![allow(unused_must_use)]
|
||||
#![allow(unused_mut)]
|
||||
//@ ignore-emscripten no threads support
|
||||
//@ needs-threads
|
||||
|
||||
use std::thread;
|
||||
|
||||
|
@ -3,7 +3,7 @@
|
||||
// Tests that a heterogeneous list of existential `dyn` types can be put inside an Arc
|
||||
// and shared between threads as long as all types fulfill Send.
|
||||
|
||||
//@ ignore-emscripten no threads support
|
||||
//@ needs-threads
|
||||
|
||||
use std::sync::Arc;
|
||||
use std::sync::mpsc::channel;
|
||||
|
Loading…
Reference in New Issue
Block a user