fork/rust

git clone https://git.julia.blue/fork/rust

borsAuto merge of #103046 - JanBeh:PR_clarify_cmp_terminology, r=workingjubilee3bcad65fbf6

master
1.4 KiB32 linesraw
1error[E0038]: the trait `Foo` cannot be made into an object
2  --> $DIR/issue-38604.rs:14:13
3   |
4LL |     let _f: Box<dyn Foo> =
5   |             ^^^^^^^^^^^^ `Foo` cannot be made into an object
6   |
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-38604.rs:2:22
9   |
10LL | trait Foo where u32: Q<Self> {
11   |       ---            ^^^^^^^ ...because it uses `Self` as a type parameter
12   |       |
13   |       this trait cannot be made into an object...
14
15error[E0038]: the trait `Foo` cannot be made into an object
16  --> $DIR/issue-38604.rs:15:9
17   |
18LL |         Box::new(());
19   |         ^^^^^^^^^^^^ `Foo` cannot be made into an object
20   |
21note: 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>
22  --> $DIR/issue-38604.rs:2:22
23   |
24LL | trait Foo where u32: Q<Self> {
25   |       ---            ^^^^^^^ ...because it uses `Self` as a type parameter
26   |       |
27   |       this trait cannot be made into an object...
28   = note: required for the cast from `Box<()>` to `Box<dyn Foo>`
29
30error: aborting due to 2 previous errors
31
32For more information about this error, try `rustc --explain E0038`.