We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1597416 commit 5e3ffa9Copy full SHA for 5e3ffa9
core/src/ptr/mod.rs
@@ -211,6 +211,7 @@ pub unsafe fn drop_in_place<T: ?Sized>(to_drop: *mut T) {
211
#[stable(feature = "rust1", since = "1.0.0")]
212
#[rustc_promotable]
213
#[rustc_const_stable(feature = "const_ptr_null", since = "1.24.0")]
214
+#[rustc_diagnostic_item = "ptr_null"]
215
pub const fn null<T>() -> *const T {
216
0 as *const T
217
}
@@ -229,6 +230,7 @@ pub const fn null<T>() -> *const T {
229
230
231
232
233
+#[rustc_diagnostic_item = "ptr_null_mut"]
234
pub const fn null_mut<T>() -> *mut T {
235
0 as *mut T
236
0 commit comments