rust/library/core
Matthias Krüger 388c10b2ac
Rollup merge of #131281 - RalfJung:const-cell, r=Amanieu
make Cell unstably const

Now that we can do interior mutability in `const`, most of the Cell API can be `const fn`. :)  The main exception is `set`, because it drops the old value. So from const context one has to use `replace`, which delegates the responsibility for dropping to the caller.

Tracking issue: https://github.com/rust-lang/rust/issues/131283

`as_array_of_cells` is itself still unstable to I added the const-ness to the feature gate for that function and not to `const_cell`, Cc #88248.

r? libs-api
2024-10-05 19:07:54 +02:00
..
benches Reformat using the new identifier sorting from rustfmt 2024-09-22 19:11:29 -04:00
src Rollup merge of #131281 - RalfJung:const-cell, r=Amanieu 2024-10-05 19:07:54 +02:00
tests Rollup merge of #131177 - workingjubilee:stabilize-const-mut-referees, r=tgross35 2024-10-04 14:11:37 -07:00
Cargo.toml Port std library to RTEMS 2024-09-03 09:19:29 +02:00