Add `cfg_attr(bootstrap)` to doc tests

This commit is contained in:
Gary Guo 2024-04-20 20:35:04 +01:00
parent 9d16364198
commit f8a1cad07c
1 changed files with 3 additions and 0 deletions

View File

@ -512,6 +512,7 @@ impl AtomicBool {
///
/// ```
/// #![feature(atomic_from_mut)]
/// # #![cfg_attr(bootstrap, feature(inline_const))]
/// use std::sync::atomic::{AtomicBool, Ordering};
///
/// let mut some_bools = [const { AtomicBool::new(false) }; 10];
@ -1314,6 +1315,7 @@ impl<T> AtomicPtr<T> {
///
/// ```
/// #![feature(atomic_from_mut)]
/// # #![cfg_attr(bootstrap, feature(inline_const))]
/// use std::ptr::null_mut;
/// use std::sync::atomic::{AtomicPtr, Ordering};
///
@ -2304,6 +2306,7 @@ macro_rules! atomic_int {
///
/// ```
/// #![feature(atomic_from_mut)]
/// # #![cfg_attr(bootstrap, feature(inline_const))]
#[doc = concat!($extra_feature, "use std::sync::atomic::{", stringify!($atomic_type), ", Ordering};")]
///
#[doc = concat!("let mut some_ints = [const { ", stringify!($atomic_type), "::new(0) }; 10];")]