From f8a1cad07c71d96c25ec578c0e88a4e22f0a2f39 Mon Sep 17 00:00:00 2001 From: Gary Guo Date: Sat, 20 Apr 2024 20:35:04 +0100 Subject: [PATCH] Add `cfg_attr(bootstrap)` to doc tests --- library/core/src/sync/atomic.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/library/core/src/sync/atomic.rs b/library/core/src/sync/atomic.rs index 7b5dfa00e46..073459fcb00 100644 --- a/library/core/src/sync/atomic.rs +++ b/library/core/src/sync/atomic.rs @@ -512,6 +512,7 @@ pub fn from_mut(v: &mut bool) -> &mut Self { /// /// ``` /// #![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 @@ pub fn from_mut(v: &mut *mut T) -> &mut Self { /// /// ``` /// #![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 @@ pub fn from_mut(v: &mut $int_type) -> &mut Self { /// /// ``` /// #![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];")]