diff options
| author | Jason Newcomb <jsnewcomb@pm.me> | 2023-09-26 23:56:38 -0400 |
|---|---|---|
| committer | Jason Newcomb <jsnewcomb@pm.me> | 2023-10-05 18:21:47 -0400 |
| commit | d464b72970faf5769c6c02d52f21f8e26eb1727d (patch) | |
| tree | 1357c41f218e1ecc933587e8d654b1f5d7b6e647 /library/core/src/slice/raw.rs | |
| parent | cae0791da47bb01f16885eb233dcd66b0093a6e1 (diff) | |
| download | rust-d464b72970faf5769c6c02d52f21f8e26eb1727d.tar.gz rust-d464b72970faf5769c6c02d52f21f8e26eb1727d.zip | |
Add more diagnostic items for clippy
Diffstat (limited to 'library/core/src/slice/raw.rs')
| -rw-r--r-- | library/core/src/slice/raw.rs | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/library/core/src/slice/raw.rs b/library/core/src/slice/raw.rs index 48a6eb03b5e..9cdf9b68afb 100644 --- a/library/core/src/slice/raw.rs +++ b/library/core/src/slice/raw.rs @@ -90,6 +90,7 @@ use crate::ptr; #[stable(feature = "rust1", since = "1.0.0")] #[rustc_const_stable(feature = "const_slice_from_raw_parts", since = "1.64.0")] #[must_use] +#[rustc_diagnostic_item = "slice_from_raw_parts"] pub const unsafe fn from_raw_parts<'a, T>(data: *const T, len: usize) -> &'a [T] { // SAFETY: the caller must uphold the safety contract for `from_raw_parts`. unsafe { @@ -136,6 +137,7 @@ pub const unsafe fn from_raw_parts<'a, T>(data: *const T, len: usize) -> &'a [T] #[stable(feature = "rust1", since = "1.0.0")] #[rustc_const_unstable(feature = "const_slice_from_raw_parts_mut", issue = "67456")] #[must_use] +#[rustc_diagnostic_item = "slice_from_raw_parts_mut"] pub const unsafe fn from_raw_parts_mut<'a, T>(data: *mut T, len: usize) -> &'a mut [T] { // SAFETY: the caller must uphold the safety contract for `from_raw_parts_mut`. unsafe { |
