diff options
| author | Matthias Schiffer <mschiffer@universe-factory.net> | 2020-04-13 20:57:35 +0200 |
|---|---|---|
| committer | Matthias Schiffer <mschiffer@universe-factory.net> | 2020-04-14 18:49:29 +0200 |
| commit | 43612e21a61bf6cd4bf741ffce64d7dd3b8ee19f (patch) | |
| tree | b55114c32cc7621390840ad0034066e4cbf13af9 | |
| parent | 0c17b3f4f4ad973694f31c027d44c73f3577fd07 (diff) | |
| download | rust-43612e21a61bf6cd4bf741ffce64d7dd3b8ee19f.tar.gz rust-43612e21a61bf6cd4bf741ffce64d7dd3b8ee19f.zip | |
ptr: implement "const_slice_ptr" and "mut_slice_ptr" lang items
| -rw-r--r-- | src/libcore/ptr/const_ptr.rs | 4 | ||||
| -rw-r--r-- | src/libcore/ptr/mut_ptr.rs | 4 |
2 files changed, 8 insertions, 0 deletions
diff --git a/src/libcore/ptr/const_ptr.rs b/src/libcore/ptr/const_ptr.rs index 52e224d2a02..00bd985114a 100644 --- a/src/libcore/ptr/const_ptr.rs +++ b/src/libcore/ptr/const_ptr.rs @@ -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 { diff --git a/src/libcore/ptr/mut_ptr.rs b/src/libcore/ptr/mut_ptr.rs index 9f85d781d69..00084456839 100644 --- a/src/libcore/ptr/mut_ptr.rs +++ b/src/libcore/ptr/mut_ptr.rs @@ -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 { |
