Skip to content

Commit 43612e2

Browse files
committed
ptr: implement "const_slice_ptr" and "mut_slice_ptr" lang items
1 parent 0c17b3f commit 43612e2

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

src/libcore/ptr/const_ptr.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -706,6 +706,10 @@ impl<T: ?Sized> *const T {
706706
}
707707
}
708708

709+
#[cfg(not(bootstrap))]
710+
#[lang = "const_slice_ptr"]
711+
impl<T> *const [T] {}
712+
709713
// Equality for pointers
710714
#[stable(feature = "rust1", since = "1.0.0")]
711715
impl<T: ?Sized> PartialEq for *const T {

src/libcore/ptr/mut_ptr.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -894,6 +894,10 @@ impl<T: ?Sized> *mut T {
894894
}
895895
}
896896

897+
#[cfg(not(bootstrap))]
898+
#[lang = "mut_slice_ptr"]
899+
impl<T> *mut [T] {}
900+
897901
// Equality for pointers
898902
#[stable(feature = "rust1", since = "1.0.0")]
899903
impl<T: ?Sized> PartialEq for *mut T {

0 commit comments

Comments
 (0)