]> git.proxmox.com Git - rustc.git/blob - src/test/ui/kindck/kindck-inherited-copy-bound.object_safe_for_dispatch.stderr
New upstream version 1.43.0+dfsg1
[rustc.git] / src / test / ui / kindck / kindck-inherited-copy-bound.object_safe_for_dispatch.stderr
1 error[E0277]: the trait bound `std::boxed::Box<{integer}>: Foo` is not satisfied
2 --> $DIR/kindck-inherited-copy-bound.rs:21:16
3 |
4 LL | fn take_param<T:Foo>(foo: &T) { }
5 | ---------- --- required by this bound in `take_param`
6 ...
7 LL | take_param(&x);
8 | ^^ the trait `std::marker::Copy` is not implemented for `std::boxed::Box<{integer}>`
9 |
10 = note: required because of the requirements on the impl of `Foo` for `std::boxed::Box<{integer}>`
11
12 error[E0038]: the trait `Foo` cannot be made into an object
13 --> $DIR/kindck-inherited-copy-bound.rs:28:13
14 |
15 LL | trait Foo : Copy {
16 | --- ---- ...because it requires `Self: Sized`
17 | |
18 | this trait cannot be made into an object...
19 ...
20 LL | let z = &x as &dyn Foo;
21 | ^^ the trait `Foo` cannot be made into an object
22 |
23 = note: required because of the requirements on the impl of `std::ops::CoerceUnsized<&dyn Foo>` for `&std::boxed::Box<i32>`
24 = note: required by cast to type `&dyn Foo`
25
26 error: aborting due to 2 previous errors
27
28 Some errors have detailed explanations: E0038, E0277.
29 For more information about an error, try `rustc --explain E0038`.