mark sys_common::once::generic::Once::new const-stable#103193
mark sys_common::once::generic::Once::new const-stable#103193bors merged 1 commit intorust-lang:masterfrom
Conversation
|
(rust-highfive has picked a reviewer for you, use r? to override) |
|
Hey! It looks like you've submitted a new PR for the library teams! If this PR contains changes to any Examples of
|
|
https://doc.rust-lang.org/nightly/std/sync/struct.Once.html#method.new has been |
|
This seems to be necessary because the generic implementation uses @bors r+ rollup |
…earth Rollup of 7 pull requests Successful merges: - rust-lang#83608 (Add slice methods for indexing via an array of indices.) - rust-lang#95583 (Deprecate the unstable `ptr_to_from_bits` feature) - rust-lang#101655 (Make the Box one-liner more descriptive) - rust-lang#102207 (Constify remaining `Layout` methods) - rust-lang#103193 (mark sys_common::once::generic::Once::new const-stable) - rust-lang#104622 (Use clang for the UEFI targets) - rust-lang#104638 (Move macro_rules diagnostics to diagnostics module) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
|
@Manishearth can we have an minimal repro for this? I'm not as involved with the const fn space so I don't have the context for how the current state is bad. |
|
@estebank tricky thing is that because it has to do with const_stable it needs to be reprod in std. I can try but I don't fully understand what's happening here either, that's why I cc'd oli |
|
I think this is a hole in our const stability checks. Basically functions without stability attributes are usable from stable const fn even if they internally call unstable const fn |
Attempt to address #103191 by marking the impl const-stable.
Picked the declaration from the callsite:
rust/library/std/src/sync/once.rs
Line 67 in 21b2465
This is similar to #98457.
With this in,
python3 x.py build library/std --target x86_64-unknown-nonesucceeds.