rust/src/liballoc
kennytm 5d0474ad73
Rollup merge of #47126 - sdroege:exact-chunks, r=bluss
Add slice::ExactChunks and ::ExactChunksMut iterators

These guarantee that always the requested slice size will be returned
and any leftoever elements at the end will be ignored. It allows llvm to
get rid of bounds checks in the code using the iterator.

This is inspired by the same iterators provided by ndarray.

Fixes https://github.com/rust-lang/rust/issues/47115

I'll add unit tests for all this if the general idea and behaviour makes sense for everybody.
Also see https://github.com/rust-lang/rust/issues/47115#issuecomment-354715511 for an example what this improves.
2018-01-15 18:49:31 +08:00
..
benches Deprecate [T]::rotate in favor of [T]::rotate_{left,right}. 2017-12-24 23:01:24 -08:00
btree Write examples for {BTree,Hash}Set::{get,replace,take} 2018-01-05 15:02:10 +01:00
tests Rollup merge of #47126 - sdroege:exact-chunks, r=bluss 2018-01-15 18:49:31 +08:00
allocator.rs Use Try syntax for Option in place of macros or match 2017-12-09 14:18:33 -08:00
arc.rs Remove transmute in From<&str> impls for Arc/Rc 2017-12-25 17:04:45 -05:00
binary_heap.rs address some FIXMEs whose associated issues were marked as closed 2017-09-30 11:33:47 +03:00
borrow.rs examples in Cow::into_owned don't need to wrap result in Cows 2017-11-14 18:23:24 -06:00
boxed.rs Update bootstrap compiler 2017-11-29 21:11:20 -08:00
boxed_test.rs Direct conversions between slices and boxes. 2017-02-06 18:53:13 -05:00
Cargo.toml std: Remove rand crate and module 2017-11-08 20:41:17 -08:00
fmt.rs Adding eprint*! to the list of macros in the format! family 2017-11-22 20:44:05 -08:00
heap.rs std: Mark allocation functions as nounwind 2017-08-28 08:06:52 -07:00
lib.rs Add slice::ExactChunks and ::ExactChunksMut iterators 2018-01-13 12:18:46 +02:00
linked_list.rs Revert "Make drop impl stable for DrainFilter" 2017-12-09 01:09:23 -07:00
macros.rs fix some typos 2017-11-21 15:33:45 +01:00
range.rs Revert "Stabilize RangeArgument" 2017-06-30 08:34:53 -10:00
raw_vec.rs Fix typo. 2017-11-01 21:02:08 +08:00
rc.rs Remove transmute in From<&str> impls for Arc/Rc 2017-12-25 17:04:45 -05:00
slice.rs Rollup merge of #47126 - sdroege:exact-chunks, r=bluss 2018-01-15 18:49:31 +08:00
str.rs update char_indices example to highlight big chars 2017-12-27 16:27:57 -06:00
string.rs type error method suggestions use whitelisted identity-like conversions 2018-01-06 17:15:59 -08:00
vec.rs Fix panic condition docs for Vec::insert. 2018-01-01 19:06:59 -08:00
vec_deque.rs address some FIXMEs whose associated issues were marked as closed 2017-09-30 11:33:47 +03:00