rust/library/core/src/ptr
Jubilee 9749a9801c
Rollup merge of #130164 - RalfJung:const_ptr_as_ref, r=dtolnay
move some const fn out of the const_ptr_as_ref feature

When a `const fn` is still `#[unstable]`, it should generally use the same feature to track its regular stability and const-stability. Then when that feature moves towards stabilization we can decide whether the const-ness can be stabilized as well, or whether it should be moved into a new feature.

Also, functions like `ptr::as_ref` (which returns an `Option<&mut T>`) require `is_null`, which is tricky and blocked on some design concerns (see #74939). So move those to the is_null feature gate, as they should be stabilized together with `ptr.is_null()`.

Affects #91822, #122034, #75402, https://github.com/rust-lang/rust/issues/74939
2024-09-09 19:20:39 -07:00
..
alignment.rs Enable Alignment::new_unchecked precondition check 2024-08-23 18:26:45 -04:00
const_ptr.rs Rollup merge of #130164 - RalfJung:const_ptr_as_ref, r=dtolnay 2024-09-09 19:20:39 -07:00
metadata.rs Remove needless returns detected by clippy in libraries 2024-09-08 21:51:00 +02:00
mod.rs Rollup merge of #129653 - RalfJung:addr-of-read-only, r=scottmcm 2024-09-05 19:43:47 +02:00
mut_ptr.rs Rollup merge of #130164 - RalfJung:const_ptr_as_ref, r=dtolnay 2024-09-09 19:20:39 -07:00
non_null.rs move some const fn out of the const_ptr_as_ref feature 2024-09-09 19:59:16 +02:00
unique.rs PinCoerceUnsized trait into core 2024-07-31 17:10:55 +08:00