Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ index 8402833..84592e0 100644
@@ -1619,7 +1619,7 @@ fn brute_force_rotate_test_1() {

#[test]
#[cfg(not(target_arch = "wasm32"))]
#[cfg(not(all(target_family = "wasm", target_os = "unknown")))]
-#[cfg_attr(miri, ignore)] // Miri is too slow
+#[ignore] // Miri is too slow
fn select_nth_unstable() {
Expand Down
4 changes: 2 additions & 2 deletions library/core/src/os/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
#[cfg(all(
doc,
any(
all(target_arch = "wasm32", not(target_os = "wasi")),
all(target_family = "wasm", not(target_os = "wasi")),
all(target_vendor = "fortanix", target_env = "sgx")
)
))]
Expand All @@ -17,7 +17,7 @@ pub mod darwin {}
#[cfg(not(all(
doc,
any(
all(target_arch = "wasm32", not(target_os = "wasi")),
all(target_family = "wasm", not(target_os = "wasi")),
all(target_vendor = "fortanix", target_env = "sgx")
)
)))]
Expand Down
4 changes: 2 additions & 2 deletions library/coretests/benches/lib.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// wasm32 does not support benches (no time).
#![cfg(not(target_arch = "wasm32"))]
// wasm*-unknown-unknown does not support benches (no time).
#![cfg(all(target_family = "wasm", target_os = "unknown"))]
// This is marked as `test = true` and hence picked up by `./x miri`, but that would be too slow.
#![cfg(not(miri))]
#![feature(flt2dec)]
Expand Down
2 changes: 1 addition & 1 deletion library/coretests/tests/num/flt2dec/random.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#![cfg(not(target_arch = "wasm32"))]
#![cfg(not(all(target_family = "wasm", target_os = "unknown")))]

use core::num::imp::flt2dec;
use std::mem::MaybeUninit;
Expand Down
2 changes: 1 addition & 1 deletion library/coretests/tests/slice.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1679,7 +1679,7 @@ fn brute_force_rotate_test_1() {
}

#[test]
#[cfg(not(target_arch = "wasm32"))]
#[cfg(not(all(target_family = "wasm", target_os = "unknown")))]
Comment thread
madsmtm marked this conversation as resolved.
#[cfg_attr(miri, ignore)] // Miri is too slow
fn select_nth_unstable() {
use core::cmp::Ordering::{Equal, Greater, Less};
Expand Down
4 changes: 2 additions & 2 deletions library/std/benches/time.rs
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
#[cfg(not(target_arch = "wasm32"))]
#[cfg(not(all(target_family = "wasm", target_os = "unknown")))]
use test::{Bencher, black_box};

macro_rules! bench_instant_threaded {
($bench_name:ident, $thread_count:expr) => {
#[bench]
#[cfg(not(target_arch = "wasm32"))]
#[cfg(not(all(target_family = "wasm", target_os = "unknown")))]
fn $bench_name(b: &mut Bencher) -> std::thread::Result<()> {
use std::sync::Arc;
use std::sync::atomic::{AtomicBool, Ordering};
Expand Down
6 changes: 3 additions & 3 deletions library/std/src/net/tcp.rs
Original file line number Diff line number Diff line change
Expand Up @@ -913,9 +913,9 @@ impl TcpListener {
/// ```
#[stable(feature = "rust1", since = "1.0.0")]
pub fn accept(&self) -> io::Result<(TcpStream, SocketAddr)> {
// On WASM, `TcpStream` is uninhabited (as it's unsupported) and so
// the `a` variable here is technically unused.
#[cfg_attr(target_arch = "wasm32", allow(unused_variables))]
// On wasm*-unknown-unknown, `TcpStream` is uninhabited (as it's
// unsupported) and so the `a` variable here is technically unused.
#[cfg_attr(all(target_family = "wasm", target_os = "unknown"), allow(unused_variables))]
self.0.accept().map(|(a, b)| (TcpStream(a), b))
}

Expand Down
6 changes: 3 additions & 3 deletions library/std/src/os/fd/owned.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ use crate::fs;
use crate::marker::PhantomData;
use crate::mem::ManuallyDrop;
#[cfg(not(any(
all(target_arch = "wasm32", not(target_os = "emscripten")),
all(target_family = "wasm", not(target_os = "emscripten")),
target_env = "sgx",
target_os = "hermit",
target_os = "trusty",
Expand Down Expand Up @@ -105,7 +105,7 @@ impl BorrowedFd<'_> {
/// Creates a new `OwnedFd` instance that shares the same underlying file
/// description as the existing `BorrowedFd` instance.
#[cfg(not(any(
all(target_arch = "wasm32", not(target_os = "emscripten")),
all(target_family = "wasm", not(target_os = "emscripten")),
target_os = "hermit",
target_os = "trusty",
target_os = "motor"
Expand Down Expand Up @@ -133,7 +133,7 @@ impl BorrowedFd<'_> {
/// Creates a new `OwnedFd` instance that shares the same underlying file
/// description as the existing `BorrowedFd` instance.
#[cfg(any(
all(target_arch = "wasm32", not(target_os = "emscripten")),
all(target_family = "wasm", not(target_os = "emscripten")),
target_os = "hermit",
target_os = "trusty"
))]
Expand Down
2 changes: 1 addition & 1 deletion library/std/src/os/fd/raw.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ use crate::io;
use crate::os::hermit::io::OwnedFd;
#[cfg(all(not(target_os = "hermit"), not(target_os = "motor")))]
use crate::os::raw;
#[cfg(all(doc, not(any(target_arch = "wasm32", target_env = "sgx", target_os = "l4re"))))]
#[cfg(all(doc, not(any(target_family = "wasm", target_env = "sgx", target_os = "l4re"))))]
use crate::os::unix::io::AsFd;
#[cfg(unix)]
use crate::os::unix::io::OwnedFd;
Expand Down
2 changes: 1 addition & 1 deletion library/std/src/os/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ pub mod raw;
#[cfg(doc)]
cfg_select! {
any(
all(target_arch = "wasm32", not(target_os = "wasi")),
all(target_family = "wasm", not(target_os = "wasi")),
all(target_vendor = "fortanix", target_env = "sgx")
) => {
#[unstable(issue = "none", feature = "std_internals")]
Expand Down
2 changes: 1 addition & 1 deletion library/std/src/os/net/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
#[cfg(not(all(
doc,
any(
all(target_arch = "wasm32", not(target_os = "wasi")),
all(target_family = "wasm", not(target_os = "wasi")),
all(target_vendor = "fortanix", target_env = "sgx")
)
)))]
Expand Down
2 changes: 1 addition & 1 deletion library/std/src/os/unix/io/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ fn replace_stdio_fd(this: BorrowedFd<'_>, other: OwnedFd) -> io::Result<()> {
.map(|_| ())
}
not(any(
all(target_arch = "wasm32", not(target_os = "emscripten")),
all(target_family = "wasm", not(target_os = "emscripten")),
target_os = "hermit",
target_os = "trusty",
target_os = "motor"
Expand Down
2 changes: 1 addition & 1 deletion library/std/tests/time.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ fn instant_monotonic() {
}

#[test]
#[cfg(not(target_arch = "wasm32"))]
#[cfg(not(all(target_family = "wasm", target_os = "unknown")))]
fn instant_monotonic_concurrent() -> std::thread::Result<()> {
let threads: Vec<_> = (0..8)
.map(|_| {
Expand Down
Loading