Skip to content

Commit 3683c43

Browse files
authored
Rollup merge of #103193 - krasimirgg:sysonce, r=Amanieu
mark sys_common::once::generic::Once::new const-stable Attempt to address #103191 by marking the impl const-stable. Picked the declaration from the callsite: https://github.com/rust-lang/rust/blob/21b246587c2687935bd6004ffa5dcc4f4dd6600d/library/std/src/sync/once.rs#L67 This is similar to #98457. With this in, `python3 x.py build library/std --target x86_64-unknown-none` succeeds.
2 parents 1625435 + df5d035 commit 3683c43

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

Diff for: library/std/src/sys_common/once/generic.rs

+1
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,7 @@ struct WaiterQueue<'a> {
107107

108108
impl Once {
109109
#[inline]
110+
#[rustc_const_stable(feature = "const_once_new", since = "1.32.0")]
110111
pub const fn new() -> Once {
111112
Once { state_and_queue: AtomicPtr::new(ptr::invalid_mut(INCOMPLETE)) }
112113
}

0 commit comments

Comments
 (0)