This is a tracking issue for the len() method on raw slice pointers, which allows to get the length of a raw slice pointer when conversion to a slice reference would be UB (because the pointer is null or unaligned).
It covers the feature gates #![feature(slice_ptr_len)]
and #![feature(const_slice_ptr_len)]
(for const fn).
impl<T> *mut [T] { pub const fn len(self) -> usize; pub const fn is_empty(self) -> bool; } impl<T> *const [T] { pub const fn len(self) -> usize; pub const fn is_empty(self) -> bool; } impl<T> NonNull<[T]> { pub const fn len(self) -> usize; // Already stable pub const fn is_empty(self) -> bool; }History / Steps
len
and slice_from_raw_parts
to NonNull<[T]>
#71940*mut [T]
methods #95594NonNull::<[T]>::is_empty
. #122800TianyiShi2001, mexus, ilyavennik, yvt, stepancheg and 2 morekornelskistanislav-tkach and mexus
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4