diff options
| author | Joshua Nelson <jyn514@gmail.com> | 2020-01-31 13:59:57 -0500 |
|---|---|---|
| committer | Joshua Nelson <jyn514@gmail.com> | 2020-03-10 23:44:46 +0000 |
| commit | ba46b61bbcd0d2860105c429cf73254c388e9118 (patch) | |
| tree | 3d1714cb76bd911733851b1aba4f506f5371788d /src/test/ui/const-generics | |
| parent | e3d5eaf2bba89db8359393ac7656db19cb421fb5 (diff) | |
| download | rust-ba46b61bbcd0d2860105c429cf73254c388e9118.tar.gz rust-ba46b61bbcd0d2860105c429cf73254c388e9118.zip | |
bless UI tests
Diffstat (limited to 'src/test/ui/const-generics')
| -rw-r--r-- | src/test/ui/const-generics/array-impls/alloc-types-no-impls-length-33.rs | 2 | ||||
| -rw-r--r-- | src/test/ui/const-generics/array-impls/alloc-types-no-impls-length-33.stderr | 23 |
2 files changed, 17 insertions, 8 deletions
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 92dff7e0792..4b195f3a06e 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 @@ -4,7 +4,7 @@ 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 + //~^ ERROR arrays only have std trait implementations for lengths 0..=32 } pub fn no_box() { diff --git a/src/test/ui/const-generics/array-impls/alloc-types-no-impls-length-33.stderr b/src/test/ui/const-generics/array-impls/alloc-types-no-impls-length-33.stderr index 193fb4c4374..d795840551c 100644 --- a/src/test/ui/const-generics/array-impls/alloc-types-no-impls-length-33.stderr +++ b/src/test/ui/const-generics/array-impls/alloc-types-no-impls-length-33.stderr @@ -1,5 +1,14 @@ +error[E0277]: arrays only have std trait implementations for lengths 0..=32 + --> $DIR/alloc-types-no-impls-length-33.rs:6:29 + | +LL | let v: Vec<_> = [0; 33].into(); + | ^^^^ the trait `std::array::LengthAtMost32` is not implemented for `[{integer}; 33]` + | + = note: required because of the requirements on the impl of `std::convert::From<[{integer}; 33]>` for `std::vec::Vec<{integer}>` + = note: required because of the requirements on the impl of `std::convert::Into<std::vec::Vec<{integer}>>` for `[{integer}; 33]` + error[E0277]: the trait bound `std::boxed::Box<[i32; 33]>: std::convert::From<std::boxed::Box<[i32]>>` is not satisfied - --> $DIR/alloc-types-no-impls-length-33.rs:7:23 + --> $DIR/alloc-types-no-impls-length-33.rs:12:23 | LL | let boxed_array = <Box<[i32; 33]>>::try_from(boxed_slice); | ^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `std::convert::From<std::boxed::Box<[i32]>>` is not implemented for `std::boxed::Box<[i32; 33]>` @@ -14,7 +23,7 @@ LL | let boxed_array = <Box<[i32; 33]>>::try_from(boxed_slice); = note: required because of the requirements on the impl of `std::convert::TryFrom<std::boxed::Box<[i32]>>` for `std::boxed::Box<[i32; 33]>` error[E0277]: the trait bound `std::boxed::Box<[i32; 33]>: std::convert::TryFrom<std::boxed::Box<[i32]>>` is not satisfied - --> $DIR/alloc-types-no-impls-length-33.rs:7:23 + --> $DIR/alloc-types-no-impls-length-33.rs:12:23 | LL | let boxed_array = <Box<[i32; 33]>>::try_from(boxed_slice); | ^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `std::convert::TryFrom<std::boxed::Box<[i32]>>` is not implemented for `std::boxed::Box<[i32; 33]>` @@ -23,7 +32,7 @@ LL | let boxed_array = <Box<[i32; 33]>>::try_from(boxed_slice); <std::boxed::Box<[T; _]> as std::convert::TryFrom<std::boxed::Box<[T]>>> error[E0277]: the trait bound `std::rc::Rc<[i32; 33]>: std::convert::From<std::rc::Rc<[i32]>>` is not satisfied - --> $DIR/alloc-types-no-impls-length-33.rs:14:23 + --> $DIR/alloc-types-no-impls-length-33.rs:19:23 | LL | let boxed_array = <Rc<[i32; 33]>>::try_from(boxed_slice); | ^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `std::convert::From<std::rc::Rc<[i32]>>` is not implemented for `std::rc::Rc<[i32; 33]>` @@ -38,7 +47,7 @@ LL | let boxed_array = <Rc<[i32; 33]>>::try_from(boxed_slice); = note: required because of the requirements on the impl of `std::convert::TryFrom<std::rc::Rc<[i32]>>` for `std::rc::Rc<[i32; 33]>` error[E0277]: the trait bound `std::rc::Rc<[i32; 33]>: std::convert::TryFrom<std::rc::Rc<[i32]>>` is not satisfied - --> $DIR/alloc-types-no-impls-length-33.rs:14:23 + --> $DIR/alloc-types-no-impls-length-33.rs:19:23 | LL | let boxed_array = <Rc<[i32; 33]>>::try_from(boxed_slice); | ^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `std::convert::TryFrom<std::rc::Rc<[i32]>>` is not implemented for `std::rc::Rc<[i32; 33]>` @@ -47,7 +56,7 @@ LL | let boxed_array = <Rc<[i32; 33]>>::try_from(boxed_slice); <std::rc::Rc<[T; _]> as std::convert::TryFrom<std::rc::Rc<[T]>>> error[E0277]: the trait bound `std::sync::Arc<[i32; 33]>: std::convert::From<std::sync::Arc<[i32]>>` is not satisfied - --> $DIR/alloc-types-no-impls-length-33.rs:21:23 + --> $DIR/alloc-types-no-impls-length-33.rs:26:23 | LL | let boxed_array = <Arc<[i32; 33]>>::try_from(boxed_slice); | ^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `std::convert::From<std::sync::Arc<[i32]>>` is not implemented for `std::sync::Arc<[i32; 33]>` @@ -62,7 +71,7 @@ LL | let boxed_array = <Arc<[i32; 33]>>::try_from(boxed_slice); = note: required because of the requirements on the impl of `std::convert::TryFrom<std::sync::Arc<[i32]>>` for `std::sync::Arc<[i32; 33]>` error[E0277]: the trait bound `std::sync::Arc<[i32; 33]>: std::convert::TryFrom<std::sync::Arc<[i32]>>` is not satisfied - --> $DIR/alloc-types-no-impls-length-33.rs:21:23 + --> $DIR/alloc-types-no-impls-length-33.rs:26:23 | LL | let boxed_array = <Arc<[i32; 33]>>::try_from(boxed_slice); | ^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `std::convert::TryFrom<std::sync::Arc<[i32]>>` is not implemented for `std::sync::Arc<[i32; 33]>` @@ -70,6 +79,6 @@ LL | let boxed_array = <Arc<[i32; 33]>>::try_from(boxed_slice); = help: the following implementations were found: <std::sync::Arc<[T; _]> as std::convert::TryFrom<std::sync::Arc<[T]>>> -error: aborting due to 6 previous errors +error: aborting due to 7 previous errors For more information about this error, try `rustc --explain E0277`. |
