From 8faac74e54e8a76cd4ff860c1b6da3836e4a1b1e Mon Sep 17 00:00:00 2001 From: est31 Date: Sat, 5 Aug 2023 05:14:32 +0200 Subject: [PATCH] Remove ptr_from_mut diagnostic item It was added by #113657 for its purposes. Now it is not used any more, remove it, as we use the attr now. --- compiler/rustc_span/src/symbol.rs | 1 - library/core/src/ptr/mod.rs | 1 - 2 files changed, 2 deletions(-) diff --git a/compiler/rustc_span/src/symbol.rs b/compiler/rustc_span/src/symbol.rs index 07d48170add..46f3487475b 100644 --- a/compiler/rustc_span/src/symbol.rs +++ b/compiler/rustc_span/src/symbol.rs @@ -1159,7 +1159,6 @@ symbols! { ptr_cast, ptr_cast_mut, ptr_const_is_null, - ptr_from_mut, ptr_from_ref, ptr_guaranteed_cmp, ptr_is_null, diff --git a/library/core/src/ptr/mod.rs b/library/core/src/ptr/mod.rs index 84cc2e474a1..8d1a4de9de6 100644 --- a/library/core/src/ptr/mod.rs +++ b/library/core/src/ptr/mod.rs @@ -712,7 +712,6 @@ pub const fn from_ref(r: &T) -> *const T { #[must_use] #[unstable(feature = "ptr_from_ref", issue = "106116")] #[cfg_attr(not(bootstrap), rustc_never_returns_null_ptr)] -#[rustc_diagnostic_item = "ptr_from_mut"] pub const fn from_mut(r: &mut T) -> *mut T { r }