about summary refs log tree commit diff
path: root/src/libstd/lib.rs
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2017-10-31 23:06:37 +0000
committerbors <bors@rust-lang.org>2017-10-31 23:06:37 +0000
commitf3b900cc3b122c7e9eb78ca28bec18df68791b08 (patch)
tree0fa55ce4def4412af633d90d87e52c18fe195fc9 /src/libstd/lib.rs
parent8b22e70b2de5152db3b0c53cfa16eb96b0b9e40e (diff)
parent4c853adce9103b8bc84cd6b0026bcdc2eed7da31 (diff)
downloadrust-f3b900cc3b122c7e9eb78ca28bec18df68791b08.tar.gz
rust-f3b900cc3b122c7e9eb78ca28bec18df68791b08.zip
Auto merge of #44764 - nvzqz:master, r=alexcrichton
Implement TryFrom<&[T]> for &[T; N]

There are many cases where a buffer with a static compile-time size is preferred over a slice with a dynamic size. This allows for performing a checked conversion from `&[T]` to `&[T; N]`. This may also lead to compile-time optimizations involving `[T; N]` such as loop unrolling.

This is my first PR to Rust, so I'm not sure if discussion of this change should happen here or does it need its own RFC? I figured these changes would be a subset of #33417.
Diffstat (limited to 'src/libstd/lib.rs')
-rw-r--r--src/libstd/lib.rs2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/libstd/lib.rs b/src/libstd/lib.rs
index 012883d0853..5cf1d225b90 100644
--- a/src/libstd/lib.rs
+++ b/src/libstd/lib.rs
@@ -243,6 +243,7 @@
 #![feature(allow_internal_unsafe)]
 #![feature(allow_internal_unstable)]
 #![feature(align_offset)]
+#![feature(array_error_internals)]
 #![feature(asm)]
 #![feature(attr_literals)]
 #![feature(box_syntax)]
@@ -267,6 +268,7 @@
 #![feature(core_intrinsics)]
 #![feature(dropck_eyepatch)]
 #![feature(exact_size_is_empty)]
+#![feature(fixed_size_array)]
 #![feature(float_from_str_radix)]
 #![feature(fn_traits)]
 #![feature(fnbox)]