@@ -1357,6 +1357,7 @@ pub const unsafe fn read_unaligned<T>(src: *const T) -> T {
13571357#[ inline]
13581358#[ stable( feature = "rust1" , since = "1.0.0" ) ]
13591359#[ rustc_const_unstable( feature = "const_ptr_write" , issue = "86302" ) ]
1360+ #[ rustc_diagnostic_item = "ptr_write" ]
13601361#[ cfg_attr( miri, track_caller) ] // even without panics, this helps for Miri backtraces
13611362pub const unsafe fn write < T > ( dst : * mut T , src : T ) {
13621363 // Semantically, it would be fine for this to be implemented as a
@@ -1459,6 +1460,7 @@ pub const unsafe fn write<T>(dst: *mut T, src: T) {
14591460#[ inline]
14601461#[ stable( feature = "ptr_unaligned" , since = "1.17.0" ) ]
14611462#[ rustc_const_unstable( feature = "const_ptr_write" , issue = "86302" ) ]
1463+ #[ rustc_diagnostic_item = "ptr_write_unaligned" ]
14621464#[ cfg_attr( miri, track_caller) ] // even without panics, this helps for Miri backtraces
14631465pub const unsafe fn write_unaligned < T > ( dst : * mut T , src : T ) {
14641466 // SAFETY: the caller must guarantee that `dst` is valid for writes.
@@ -1607,6 +1609,7 @@ pub unsafe fn read_volatile<T>(src: *const T) -> T {
16071609/// ```
16081610#[ inline]
16091611#[ stable( feature = "volatile" , since = "1.9.0" ) ]
1612+ #[ rustc_diagnostic_item = "ptr_write_volatile" ]
16101613#[ cfg_attr( miri, track_caller) ] // even without panics, this helps for Miri backtraces
16111614pub unsafe fn write_volatile < T > ( dst : * mut T , src : T ) {
16121615 // SAFETY: the caller must uphold the safety contract for `volatile_store`.
0 commit comments