mirror of
https://github.com/rust-lang/rust.git
synced 2026-05-17 05:25:37 +03:00
ptr: implement "const_slice_ptr" and "mut_slice_ptr" lang items
This commit is contained in:
@@ -706,6 +706,10 @@ pub fn align_offset(self, align: usize) -> usize
|
||||
}
|
||||
}
|
||||
|
||||
#[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 @@ pub fn align_offset(self, align: usize) -> usize
|
||||
}
|
||||
}
|
||||
|
||||
#[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 {
|
||||
|
||||
Reference in New Issue
Block a user