mirror of
https://github.com/rust-lang/rust.git
synced 2025-02-22 03:44:24 +00:00
Add reference to tracking issue #86302 for const_ptr_write
This commit is contained in:
parent
1aa032f506
commit
22fe76d97d
@ -871,7 +871,7 @@ pub const unsafe fn read_unaligned<T>(src: *const T) -> T {
|
||||
/// ```
|
||||
#[inline]
|
||||
#[stable(feature = "rust1", since = "1.0.0")]
|
||||
#[rustc_const_unstable(feature = "const_ptr_write", issue = "none")]
|
||||
#[rustc_const_unstable(feature = "const_ptr_write", issue = "86302")]
|
||||
pub const unsafe fn write<T>(dst: *mut T, src: T) {
|
||||
// We are calling the intrinsics directly to avoid function calls in the generated code
|
||||
// as `intrinsics::copy_nonoverlapping` is a wrapper function.
|
||||
@ -968,7 +968,7 @@ pub const unsafe fn write<T>(dst: *mut T, src: T) {
|
||||
/// ```
|
||||
#[inline]
|
||||
#[stable(feature = "ptr_unaligned", since = "1.17.0")]
|
||||
#[rustc_const_unstable(feature = "const_ptr_write", issue = "none")]
|
||||
#[rustc_const_unstable(feature = "const_ptr_write", issue = "86302")]
|
||||
pub const unsafe fn write_unaligned<T>(dst: *mut T, src: T) {
|
||||
// SAFETY: the caller must guarantee that `dst` is valid for writes.
|
||||
// `dst` cannot overlap `src` because the caller has mutable access
|
||||
|
@ -1002,7 +1002,7 @@ impl<T: ?Sized> *mut T {
|
||||
///
|
||||
/// [`ptr::write`]: crate::ptr::write()
|
||||
#[stable(feature = "pointer_methods", since = "1.26.0")]
|
||||
#[rustc_const_unstable(feature = "const_ptr_write", issue = "none")]
|
||||
#[rustc_const_unstable(feature = "const_ptr_write", issue = "86302")]
|
||||
#[inline(always)]
|
||||
pub const unsafe fn write(self, val: T)
|
||||
where
|
||||
@ -1057,7 +1057,7 @@ impl<T: ?Sized> *mut T {
|
||||
///
|
||||
/// [`ptr::write_unaligned`]: crate::ptr::write_unaligned()
|
||||
#[stable(feature = "pointer_methods", since = "1.26.0")]
|
||||
#[rustc_const_unstable(feature = "const_ptr_write", issue = "none")]
|
||||
#[rustc_const_unstable(feature = "const_ptr_write", issue = "86302")]
|
||||
#[inline(always)]
|
||||
pub const unsafe fn write_unaligned(self, val: T)
|
||||
where
|
||||
|
Loading…
Reference in New Issue
Block a user