Skip to content

Commit

Permalink
Add cfg_attr(bootstrap) to doc tests
Browse files Browse the repository at this point in the history
  • Loading branch information
nbdd0121 committed Apr 24, 2024
1 parent 9d16364 commit f8a1cad
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions library/core/src/sync/atomic.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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];
Expand Down Expand Up @@ -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};
///
Expand Down Expand Up @@ -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];")]
Expand Down

0 comments on commit f8a1cad

Please sign in to comment.