about summary refs log tree commit diff
path: root/library/alloc/src/slice.rs
diff options
context:
space:
mode:
authorkadmin <julianknodt@gmail.com>2020-08-13 19:09:14 +0000
committerkadmin <julianknodt@gmail.com>2020-09-16 14:52:20 +0000
commitf240abc1dc9e59bfabfb5ea765fa9eae0aad3122 (patch)
tree56f5bdb791e20ed72b589b92c3cf087b93ae16c6 /library/alloc/src/slice.rs
parentf4e4485a052857e5dd32ea29ceb7b1a8223e83cc (diff)
downloadrust-f240abc1dc9e59bfabfb5ea765fa9eae0aad3122.tar.gz
rust-f240abc1dc9e59bfabfb5ea765fa9eae0aad3122.zip
Add array window fn
Updated issue to #75027

Update to rm oob access

And hopefully fix docs as well

Fixed naming conflict in test

Fix test which used 1-indexing

Nth starts from 0, woops

Fix a bunch of off by 1 errors

See https://play.rust-lang.org/?version=nightly&mode=debug&edition=2018&gist=757b311987e3fae1ca47122969acda5a

Add even more off by 1 errors

And also write `next` and `next_back` in terms of `nth` and `nth_back`.

Run fmt

Fix forgetting to change fn name in test

add nth_back test & document unsafe

Remove as_ref().unwrap()
Documented occurrences of unsafe, noting what invariants are maintained
Diffstat (limited to 'library/alloc/src/slice.rs')
-rw-r--r--library/alloc/src/slice.rs2
1 files changed, 2 insertions, 0 deletions
diff --git a/library/alloc/src/slice.rs b/library/alloc/src/slice.rs
index 677bfdd2349..93501ef4085 100644
--- a/library/alloc/src/slice.rs
+++ b/library/alloc/src/slice.rs
@@ -95,6 +95,8 @@ use crate::vec::Vec;
 pub use core::slice::ArrayChunks;
 #[unstable(feature = "array_chunks", issue = "74985")]
 pub use core::slice::ArrayChunksMut;
+#[unstable(feature = "array_windows", issue = "75027")]
+pub use core::slice::ArrayWindows;
 #[stable(feature = "slice_get_slice", since = "1.28.0")]
 pub use core::slice::SliceIndex;
 #[stable(feature = "from_ref", since = "1.28.0")]