Skip to content

Commit

Permalink
Remove track-caller on slice creation
Browse files Browse the repository at this point in the history
  • Loading branch information
saethlin committed Sep 4, 2024
1 parent 6ba38e6 commit ea2521c
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions library/core/src/slice/raw.rs
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,6 @@ use crate::{array, ptr, ub_checks};
#[rustc_const_stable(feature = "const_slice_from_raw_parts", since = "1.64.0")]
#[must_use]
#[rustc_diagnostic_item = "slice_from_raw_parts"]
#[track_caller]
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 {
Expand Down Expand Up @@ -175,7 +174,6 @@ pub const unsafe fn from_raw_parts<'a, T>(data: *const T, len: usize) -> &'a [T]
#[rustc_const_unstable(feature = "const_slice_from_raw_parts_mut", issue = "67456")]
#[must_use]
#[rustc_diagnostic_item = "slice_from_raw_parts_mut"]
#[track_caller]
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 {
Expand Down

0 comments on commit ea2521c

Please sign in to comment.