Skip to content

Commit ea2521c

Browse files
committed
Remove track-caller on slice creation
1 parent 6ba38e6 commit ea2521c

File tree

1 file changed

+0
-2
lines changed

1 file changed

+0
-2
lines changed

library/core/src/slice/raw.rs

-2
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,6 @@ use crate::{array, ptr, ub_checks};
120120
#[rustc_const_stable(feature = "const_slice_from_raw_parts", since = "1.64.0")]
121121
#[must_use]
122122
#[rustc_diagnostic_item = "slice_from_raw_parts"]
123-
#[track_caller]
124123
pub const unsafe fn from_raw_parts<'a, T>(data: *const T, len: usize) -> &'a [T] {
125124
// SAFETY: the caller must uphold the safety contract for `from_raw_parts`.
126125
unsafe {
@@ -175,7 +174,6 @@ pub const unsafe fn from_raw_parts<'a, T>(data: *const T, len: usize) -> &'a [T]
175174
#[rustc_const_unstable(feature = "const_slice_from_raw_parts_mut", issue = "67456")]
176175
#[must_use]
177176
#[rustc_diagnostic_item = "slice_from_raw_parts_mut"]
178-
#[track_caller]
179177
pub const unsafe fn from_raw_parts_mut<'a, T>(data: *mut T, len: usize) -> &'a mut [T] {
180178
// SAFETY: the caller must uphold the safety contract for `from_raw_parts_mut`.
181179
unsafe {

0 commit comments

Comments
 (0)