From 43612e21a61bf6cd4bf741ffce64d7dd3b8ee19f Mon Sep 17 00:00:00 2001 From: Matthias Schiffer Date: Mon, 13 Apr 2020 20:57:35 +0200 Subject: [PATCH] ptr: implement "const_slice_ptr" and "mut_slice_ptr" lang items --- src/libcore/ptr/const_ptr.rs | 4 ++++ src/libcore/ptr/mut_ptr.rs | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/src/libcore/ptr/const_ptr.rs b/src/libcore/ptr/const_ptr.rs index 52e224d2a026..00bd985114a7 100644 --- a/src/libcore/ptr/const_ptr.rs +++ b/src/libcore/ptr/const_ptr.rs @@ -706,6 +706,10 @@ impl *const T { } } +#[cfg(not(bootstrap))] +#[lang = "const_slice_ptr"] +impl *const [T] {} + // Equality for pointers #[stable(feature = "rust1", since = "1.0.0")] impl PartialEq for *const T { diff --git a/src/libcore/ptr/mut_ptr.rs b/src/libcore/ptr/mut_ptr.rs index 9f85d781d698..00084456839e 100644 --- a/src/libcore/ptr/mut_ptr.rs +++ b/src/libcore/ptr/mut_ptr.rs @@ -894,6 +894,10 @@ impl *mut T { } } +#[cfg(not(bootstrap))] +#[lang = "mut_slice_ptr"] +impl *mut [T] {} + // Equality for pointers #[stable(feature = "rust1", since = "1.0.0")] impl PartialEq for *mut T {