ptr: implement "const_slice_ptr" and "mut_slice_ptr" lang items
This commit is contained in:
parent
0c17b3f4f4
commit
43612e21a6
@ -706,6 +706,10 @@ impl<T: ?Sized> *const T {
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(not(bootstrap))]
|
||||
#[lang = "const_slice_ptr"]
|
||||
impl<T> *const [T] {}
|
||||
|
||||
// Equality for pointers
|
||||
#[stable(feature = "rust1", since = "1.0.0")]
|
||||
impl<T: ?Sized> PartialEq for *const T {
|
||||
|
@ -894,6 +894,10 @@ impl<T: ?Sized> *mut T {
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(not(bootstrap))]
|
||||
#[lang = "mut_slice_ptr"]
|
||||
impl<T> *mut [T] {}
|
||||
|
||||
// Equality for pointers
|
||||
#[stable(feature = "rust1", since = "1.0.0")]
|
||||
impl<T: ?Sized> PartialEq for *mut T {
|
||||
|
Loading…
x
Reference in New Issue
Block a user