@@ -18,10 +18,23 @@ LL | let boxed_array = <Box<[i32; 33]>>::try_from(boxed_slice);
18
18
<std::boxed::Box<(dyn std::error::Error + 'static)> as std::convert::From<&str>>
19
19
<std::boxed::Box<(dyn std::error::Error + 'static)> as std::convert::From<std::borrow::Cow<'a, str>>>
20
20
<std::boxed::Box<(dyn std::error::Error + 'static)> as std::convert::From<std::string::String>>
21
- and 21 others
21
+ and 22 others
22
22
= note: required because of the requirements on the impl of `std::convert::Into<std::boxed::Box<[i32; 33]>>` for `std::boxed::Box<[i32]>`
23
23
= note: required because of the requirements on the impl of `std::convert::TryFrom<std::boxed::Box<[i32]>>` for `std::boxed::Box<[i32; 33]>`
24
24
25
+ error[E0277]: arrays only have std trait implementations for lengths 0..=32
26
+ --> $DIR/alloc-types-no-impls-length-33.rs:15:42
27
+ |
28
+ LL | let boxed_slice = <Box<[i32]>>::from([0; 33]);
29
+ | ^^^^^^^
30
+ | |
31
+ | expected an implementor of trait `std::convert::From<[{integer}; 33]>`
32
+ | help: consider borrowing here: `&[0; 33]`
33
+ |
34
+ = note: the trait bound `[i32; 33]: std::convert::From<[{integer}; 33]>` is not satisfied
35
+ = note: required because of the requirements on the impl of `std::convert::From<[i32; 33]>` for `std::boxed::Box<[i32]>`
36
+ = note: required by `std::convert::From::from`
37
+
25
38
error[E0277]: the trait bound `std::boxed::Box<[i32; 33]>: std::convert::TryFrom<std::boxed::Box<[i32]>>` is not satisfied
26
39
--> $DIR/alloc-types-no-impls-length-33.rs:12:23
27
40
|
@@ -32,7 +45,7 @@ LL | let boxed_array = <Box<[i32; 33]>>::try_from(boxed_slice);
32
45
<std::boxed::Box<[T; N]> as std::convert::TryFrom<std::boxed::Box<[T]>>>
33
46
34
47
error[E0277]: the trait bound `std::rc::Rc<[i32; 33]>: std::convert::From<std::rc::Rc<[i32]>>` is not satisfied
35
- --> $DIR/alloc-types-no-impls-length-33.rs:19 :23
48
+ --> $DIR/alloc-types-no-impls-length-33.rs:21 :23
36
49
|
37
50
LL | let boxed_array = <Rc<[i32; 33]>>::try_from(boxed_slice);
38
51
| ^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `std::convert::From<std::rc::Rc<[i32]>>` is not implemented for `std::rc::Rc<[i32; 33]>`
@@ -47,7 +60,7 @@ LL | let boxed_array = <Rc<[i32; 33]>>::try_from(boxed_slice);
47
60
= note: required because of the requirements on the impl of `std::convert::TryFrom<std::rc::Rc<[i32]>>` for `std::rc::Rc<[i32; 33]>`
48
61
49
62
error[E0277]: the trait bound `std::rc::Rc<[i32; 33]>: std::convert::TryFrom<std::rc::Rc<[i32]>>` is not satisfied
50
- --> $DIR/alloc-types-no-impls-length-33.rs:19 :23
63
+ --> $DIR/alloc-types-no-impls-length-33.rs:21 :23
51
64
|
52
65
LL | let boxed_array = <Rc<[i32; 33]>>::try_from(boxed_slice);
53
66
| ^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `std::convert::TryFrom<std::rc::Rc<[i32]>>` is not implemented for `std::rc::Rc<[i32; 33]>`
@@ -56,7 +69,7 @@ LL | let boxed_array = <Rc<[i32; 33]>>::try_from(boxed_slice);
56
69
<std::rc::Rc<[T; N]> as std::convert::TryFrom<std::rc::Rc<[T]>>>
57
70
58
71
error[E0277]: the trait bound `std::sync::Arc<[i32; 33]>: std::convert::From<std::sync::Arc<[i32]>>` is not satisfied
59
- --> $DIR/alloc-types-no-impls-length-33.rs:26 :23
72
+ --> $DIR/alloc-types-no-impls-length-33.rs:28 :23
60
73
|
61
74
LL | let boxed_array = <Arc<[i32; 33]>>::try_from(boxed_slice);
62
75
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `std::convert::From<std::sync::Arc<[i32]>>` is not implemented for `std::sync::Arc<[i32; 33]>`
@@ -71,14 +84,14 @@ LL | let boxed_array = <Arc<[i32; 33]>>::try_from(boxed_slice);
71
84
= note: required because of the requirements on the impl of `std::convert::TryFrom<std::sync::Arc<[i32]>>` for `std::sync::Arc<[i32; 33]>`
72
85
73
86
error[E0277]: the trait bound `std::sync::Arc<[i32; 33]>: std::convert::TryFrom<std::sync::Arc<[i32]>>` is not satisfied
74
- --> $DIR/alloc-types-no-impls-length-33.rs:26 :23
87
+ --> $DIR/alloc-types-no-impls-length-33.rs:28 :23
75
88
|
76
89
LL | let boxed_array = <Arc<[i32; 33]>>::try_from(boxed_slice);
77
90
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `std::convert::TryFrom<std::sync::Arc<[i32]>>` is not implemented for `std::sync::Arc<[i32; 33]>`
78
91
|
79
92
= help: the following implementations were found:
80
93
<std::sync::Arc<[T; N]> as std::convert::TryFrom<std::sync::Arc<[T]>>>
81
94
82
- error: aborting due to 7 previous errors
95
+ error: aborting due to 8 previous errors
83
96
84
97
For more information about this error, try `rustc --explain E0277`.
0 commit comments