diff options
| author | Manish Goregaokar <manishsmail@gmail.com> | 2022-11-22 01:26:07 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-11-22 01:26:07 -0500 |
| commit | 3683c43a0577df9d4197b619ae788b5f4ea5d1f2 (patch) | |
| tree | 61eb79fb6352f295e99738b72dda38b67523523a /library/std/src/sys_common | |
| parent | 1625435fa40005084d9cc8d5cf0ab116e8592d97 (diff) | |
| parent | df5d035f5199eab85dac327cbbd30a3ddfe29abd (diff) | |
| download | rust-3683c43a0577df9d4197b619ae788b5f4ea5d1f2.tar.gz rust-3683c43a0577df9d4197b619ae788b5f4ea5d1f2.zip | |
Rollup merge of #103193 - krasimirgg:sysonce, r=Amanieu
mark sys_common::once::generic::Once::new const-stable Attempt to address https://github.com/rust-lang/rust/issues/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 https://github.com/rust-lang/rust/pull/98457. With this in, `python3 x.py build library/std --target x86_64-unknown-none` succeeds.
Diffstat (limited to 'library/std/src/sys_common')
| -rw-r--r-- | library/std/src/sys_common/once/generic.rs | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/library/std/src/sys_common/once/generic.rs b/library/std/src/sys_common/once/generic.rs index acf5f247164..d953a674592 100644 --- a/library/std/src/sys_common/once/generic.rs +++ b/library/std/src/sys_common/once/generic.rs @@ -107,6 +107,7 @@ struct WaiterQueue<'a> { impl Once { #[inline] + #[rustc_const_stable(feature = "const_once_new", since = "1.32.0")] pub const fn new() -> Once { Once { state_and_queue: AtomicPtr::new(ptr::invalid_mut(INCOMPLETE)) } } |
