Skip to content

Commit ba46b61

Browse files
committed
bless UI tests
1 parent e3d5eaf commit ba46b61

File tree

2 files changed

+17
-8
lines changed

2 files changed

+17
-8
lines changed

src/test/ui/const-generics/array-impls/alloc-types-no-impls-length-33.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ use std::{convert::TryFrom, rc::Rc, sync::Arc};
44

55
pub fn no_vec() {
66
let v: Vec<_> = [0; 33].into();
7-
//~^ ERROR the trait bound `std::vec::Vec<u8>: std::convert::From<[u8; 33]>` is not satisfied
7+
//~^ ERROR arrays only have std trait implementations for lengths 0..=32
88
}
99

1010
pub fn no_box() {

src/test/ui/const-generics/array-impls/alloc-types-no-impls-length-33.stderr

Lines changed: 16 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,14 @@
1+
error[E0277]: arrays only have std trait implementations for lengths 0..=32
2+
--> $DIR/alloc-types-no-impls-length-33.rs:6:29
3+
|
4+
LL | let v: Vec<_> = [0; 33].into();
5+
| ^^^^ the trait `std::array::LengthAtMost32` is not implemented for `[{integer}; 33]`
6+
|
7+
= note: required because of the requirements on the impl of `std::convert::From<[{integer}; 33]>` for `std::vec::Vec<{integer}>`
8+
= note: required because of the requirements on the impl of `std::convert::Into<std::vec::Vec<{integer}>>` for `[{integer}; 33]`
9+
110
error[E0277]: the trait bound `std::boxed::Box<[i32; 33]>: std::convert::From<std::boxed::Box<[i32]>>` is not satisfied
2-
--> $DIR/alloc-types-no-impls-length-33.rs:7:23
11+
--> $DIR/alloc-types-no-impls-length-33.rs:12:23
312
|
413
LL | let boxed_array = <Box<[i32; 33]>>::try_from(boxed_slice);
514
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ 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);
1423
= note: required because of the requirements on the impl of `std::convert::TryFrom<std::boxed::Box<[i32]>>` for `std::boxed::Box<[i32; 33]>`
1524

1625
error[E0277]: the trait bound `std::boxed::Box<[i32; 33]>: std::convert::TryFrom<std::boxed::Box<[i32]>>` is not satisfied
17-
--> $DIR/alloc-types-no-impls-length-33.rs:7:23
26+
--> $DIR/alloc-types-no-impls-length-33.rs:12:23
1827
|
1928
LL | let boxed_array = <Box<[i32; 33]>>::try_from(boxed_slice);
2029
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ 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);
2332
<std::boxed::Box<[T; _]> as std::convert::TryFrom<std::boxed::Box<[T]>>>
2433

2534
error[E0277]: the trait bound `std::rc::Rc<[i32; 33]>: std::convert::From<std::rc::Rc<[i32]>>` is not satisfied
26-
--> $DIR/alloc-types-no-impls-length-33.rs:14:23
35+
--> $DIR/alloc-types-no-impls-length-33.rs:19:23
2736
|
2837
LL | let boxed_array = <Rc<[i32; 33]>>::try_from(boxed_slice);
2938
| ^^^^^^^^^^^^^^^^^^^^^^^^^ 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);
3847
= note: required because of the requirements on the impl of `std::convert::TryFrom<std::rc::Rc<[i32]>>` for `std::rc::Rc<[i32; 33]>`
3948

4049
error[E0277]: the trait bound `std::rc::Rc<[i32; 33]>: std::convert::TryFrom<std::rc::Rc<[i32]>>` is not satisfied
41-
--> $DIR/alloc-types-no-impls-length-33.rs:14:23
50+
--> $DIR/alloc-types-no-impls-length-33.rs:19:23
4251
|
4352
LL | let boxed_array = <Rc<[i32; 33]>>::try_from(boxed_slice);
4453
| ^^^^^^^^^^^^^^^^^^^^^^^^^ 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);
4756
<std::rc::Rc<[T; _]> as std::convert::TryFrom<std::rc::Rc<[T]>>>
4857

4958
error[E0277]: the trait bound `std::sync::Arc<[i32; 33]>: std::convert::From<std::sync::Arc<[i32]>>` is not satisfied
50-
--> $DIR/alloc-types-no-impls-length-33.rs:21:23
59+
--> $DIR/alloc-types-no-impls-length-33.rs:26:23
5160
|
5261
LL | let boxed_array = <Arc<[i32; 33]>>::try_from(boxed_slice);
5362
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `std::convert::From<std::sync::Arc<[i32]>>` is not implemented for `std::sync::Arc<[i32; 33]>`
@@ -62,14 +71,14 @@ LL | let boxed_array = <Arc<[i32; 33]>>::try_from(boxed_slice);
6271
= note: required because of the requirements on the impl of `std::convert::TryFrom<std::sync::Arc<[i32]>>` for `std::sync::Arc<[i32; 33]>`
6372

6473
error[E0277]: the trait bound `std::sync::Arc<[i32; 33]>: std::convert::TryFrom<std::sync::Arc<[i32]>>` is not satisfied
65-
--> $DIR/alloc-types-no-impls-length-33.rs:21:23
74+
--> $DIR/alloc-types-no-impls-length-33.rs:26:23
6675
|
6776
LL | let boxed_array = <Arc<[i32; 33]>>::try_from(boxed_slice);
6877
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `std::convert::TryFrom<std::sync::Arc<[i32]>>` is not implemented for `std::sync::Arc<[i32; 33]>`
6978
|
7079
= help: the following implementations were found:
7180
<std::sync::Arc<[T; _]> as std::convert::TryFrom<std::sync::Arc<[T]>>>
7281

73-
error: aborting due to 6 previous errors
82+
error: aborting due to 7 previous errors
7483

7584
For more information about this error, try `rustc --explain E0277`.

0 commit comments

Comments
 (0)