]> git.proxmox.com Git - rustc.git/blame - src/test/ui/issues/issue-20692.stderr
New upstream version 1.49.0+dfsg1
[rustc.git] / src / test / ui / issues / issue-20692.stderr
CommitLineData
ff7c6d11 1error[E0038]: the trait `Array` cannot be made into an object
0731742a 2 --> $DIR/issue-20692.rs:7:5
ff7c6d11 3 |
dc9dc135 4LL | &dyn Array;
72b1a166 5 | ^^^^^^^^^^ `Array` cannot be made into an object
ff7c6d11 6 |
72b1a166
FG
7note: for a trait to be "object safe" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
8 --> $DIR/issue-20692.rs:1:14
9 |
10LL | trait Array: Sized + Copy {}
11 | ----- ^^^^^ ^^^^ ...because it requires `Self: Sized`
12 | | |
13 | | ...because it requires `Self: Sized`
14 | this trait cannot be made into an object...
ff7c6d11
XL
15
16error[E0038]: the trait `Array` cannot be made into an object
0731742a 17 --> $DIR/issue-20692.rs:4:13
ff7c6d11 18 |
0531ce1d 19LL | let _ = x
72b1a166
FG
20 | ^ `Array` cannot be made into an object
21 |
22note: for a trait to be "object safe" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
23 --> $DIR/issue-20692.rs:1:14
ff7c6d11 24 |
72b1a166
FG
25LL | trait Array: Sized + Copy {}
26 | ----- ^^^^^ ^^^^ ...because it requires `Self: Sized`
27 | | |
28 | | ...because it requires `Self: Sized`
29 | this trait cannot be made into an object...
30 = note: required because of the requirements on the impl of `CoerceUnsized<&dyn Array>` for `&T`
e74abb32 31 = note: required by cast to type `&dyn Array`
ff7c6d11
XL
32
33error: aborting due to 2 previous errors
34
0531ce1d 35For more information about this error, try `rustc --explain E0038`.