Updated std doctests for wasm

This updates some doctests that fail to run on wasm. We will soon be
supporting cross-compiled doctests, and the test-various job fails to
run these tests. These tests fail because wasm32-wasip1 does not support
threads.
This commit is contained in:
Eric Huss 2025-05-15 19:59:22 -07:00
parent 6d1875f99b
commit db950fa77f
2 changed files with 8 additions and 8 deletions

View file

@ -231,7 +231,7 @@ pub const unsafe fn assert_unchecked(cond: bool) {
///
/// # Examples
///
/// ```
/// ```ignore-wasm
/// use std::sync::atomic::{AtomicBool, Ordering};
/// use std::sync::Arc;
/// use std::{hint, thread};

View file

@ -193,7 +193,7 @@
//!
//! A simple spinlock:
//!
//! ```
//! ```ignore-wasm
//! use std::sync::Arc;
//! use std::sync::atomic::{AtomicUsize, Ordering};
//! use std::{hint, thread};
@ -622,7 +622,7 @@ impl AtomicBool {
///
/// # Examples
///
/// ```
/// ```ignore-wasm
/// #![feature(atomic_from_mut)]
/// use std::sync::atomic::{AtomicBool, Ordering};
///
@ -653,7 +653,7 @@ impl AtomicBool {
///
/// # Examples
///
/// ```
/// ```rust,ignore-wasm
/// #![feature(atomic_from_mut)]
/// use std::sync::atomic::{AtomicBool, Ordering};
///
@ -1548,7 +1548,7 @@ impl<T> AtomicPtr<T> {
///
/// # Examples
///
/// ```
/// ```ignore-wasm
/// #![feature(atomic_from_mut)]
/// use std::ptr::null_mut;
/// use std::sync::atomic::{AtomicPtr, Ordering};
@ -1585,7 +1585,7 @@ impl<T> AtomicPtr<T> {
///
/// # Examples
///
/// ```
/// ```ignore-wasm
/// #![feature(atomic_from_mut)]
/// use std::ptr::null_mut;
/// use std::sync::atomic::{AtomicPtr, Ordering};
@ -2692,7 +2692,7 @@ macro_rules! atomic_int {
///
/// # Examples
///
/// ```
/// ```ignore-wasm
/// #![feature(atomic_from_mut)]
#[doc = concat!($extra_feature, "use std::sync::atomic::{", stringify!($atomic_type), ", Ordering};")]
///
@ -2725,7 +2725,7 @@ macro_rules! atomic_int {
///
/// # Examples
///
/// ```
/// ```ignore-wasm
/// #![feature(atomic_from_mut)]
#[doc = concat!($extra_feature, "use std::sync::atomic::{", stringify!($atomic_type), ", Ordering};")]
///