about summary refs log tree commit diff
path: root/src/test/ui/const-generics/array-impls
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/ui/const-generics/array-impls')
-rw-r--r--src/test/ui/const-generics/array-impls/alloc-traits-impls-length-32.rs4
-rw-r--r--src/test/ui/const-generics/array-impls/alloc-types-no-impls-length-33.rs5
2 files changed, 9 insertions, 0 deletions
diff --git a/src/test/ui/const-generics/array-impls/alloc-traits-impls-length-32.rs b/src/test/ui/const-generics/array-impls/alloc-traits-impls-length-32.rs
index db941a440e1..0d0765e971d 100644
--- a/src/test/ui/const-generics/array-impls/alloc-traits-impls-length-32.rs
+++ b/src/test/ui/const-generics/array-impls/alloc-traits-impls-length-32.rs
@@ -14,6 +14,10 @@ where
     Vec::<A>::new()
 }
 
+pub fn yes_array_into_vec<T>() -> Vec<T> {
+    [].into()
+}
+
 use std::collections::VecDeque;
 
 pub fn yes_vecdeque_partial_eq_array<A, B>() -> impl PartialEq<[B; 32]>
diff --git a/src/test/ui/const-generics/array-impls/alloc-types-no-impls-length-33.rs b/src/test/ui/const-generics/array-impls/alloc-types-no-impls-length-33.rs
index 3a23b9b5832..92dff7e0792 100644
--- a/src/test/ui/const-generics/array-impls/alloc-types-no-impls-length-33.rs
+++ b/src/test/ui/const-generics/array-impls/alloc-types-no-impls-length-33.rs
@@ -2,6 +2,11 @@
 
 use std::{convert::TryFrom, rc::Rc, sync::Arc};
 
+pub fn no_vec() {
+    let v: Vec<_> = [0; 33].into();
+    //~^ ERROR the trait bound `std::vec::Vec<u8>: std::convert::From<[u8; 33]>` is not satisfied
+}
+
 pub fn no_box() {
     let boxed_slice = Box::new([0; 33]) as Box<[i32]>;
     let boxed_array = <Box<[i32; 33]>>::try_from(boxed_slice);