@@ -1357,6 +1357,7 @@ pub const unsafe fn read_unaligned<T>(src: *const T) -> T {
1357
1357
#[ inline]
1358
1358
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
1359
1359
#[ rustc_const_unstable( feature = "const_ptr_write" , issue = "86302" ) ]
1360
+ #[ rustc_diagnostic_item = "ptr_write" ]
1360
1361
#[ cfg_attr( miri, track_caller) ] // even without panics, this helps for Miri backtraces
1361
1362
pub const unsafe fn write < T > ( dst : * mut T , src : T ) {
1362
1363
// 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) {
1459
1460
#[ inline]
1460
1461
#[ stable( feature = "ptr_unaligned" , since = "1.17.0" ) ]
1461
1462
#[ rustc_const_unstable( feature = "const_ptr_write" , issue = "86302" ) ]
1463
+ #[ rustc_diagnostic_item = "ptr_write_unaligned" ]
1462
1464
#[ cfg_attr( miri, track_caller) ] // even without panics, this helps for Miri backtraces
1463
1465
pub const unsafe fn write_unaligned < T > ( dst : * mut T , src : T ) {
1464
1466
// 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 {
1607
1609
/// ```
1608
1610
#[ inline]
1609
1611
#[ stable( feature = "volatile" , since = "1.9.0" ) ]
1612
+ #[ rustc_diagnostic_item = "ptr_write_volatile" ]
1610
1613
#[ cfg_attr( miri, track_caller) ] // even without panics, this helps for Miri backtraces
1611
1614
pub unsafe fn write_volatile < T > ( dst : * mut T , src : T ) {
1612
1615
// SAFETY: the caller must uphold the safety contract for `volatile_store`.
0 commit comments