d5b69d4670
Bring back slice::ref_slice as slice::from_ref. These functions were deprecated and removed in 1.5, but such simple functionality shouldn't require using unsafe code, and it isn't cluttering libstd too much. The original removal was quite contentious (see #27774), since then we've had precedent for including such nuggets of functionality (see rust-lang/rfcs#1789), and @nikomatsakis has provided a lot of use cases in https://github.com/rust-lang/rfcs/pull/1789#issuecomment-314640034. Hence this PR. I'm not too sure what to do with stability, feel free to correct me. It seems pointless to go through stabilization for these functions though. cc @aturon |
||
---|---|---|
.. | ||
benches | ||
btree | ||
tests | ||
allocator.rs | ||
arc.rs | ||
binary_heap.rs | ||
borrow.rs | ||
boxed_test.rs | ||
boxed.rs | ||
Cargo.toml | ||
fmt.rs | ||
heap.rs | ||
lib.rs | ||
linked_list.rs | ||
macros.rs | ||
range.rs | ||
raw_vec.rs | ||
rc.rs | ||
slice.rs | ||
str.rs | ||
string.rs | ||
vec_deque.rs | ||
vec.rs |