1 error[E0038]: the trait `Foo` cannot be made into an object
2 --> $DIR/issue-38604.rs:14:13
4 LL | let _f: Box<dyn Foo> =
5 | ^^^^^^^^^^^^ `Foo` cannot be made into an object
7 note: 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
10 LL | trait Foo where u32: Q<Self> {
11 | --- ^^^^^^^ ...because it uses `Self` as a type parameter
13 | this trait cannot be made into an object...
15 error[E0038]: the trait `Foo` cannot be made into an object
16 --> $DIR/issue-38604.rs:15:9
19 | ^^^^^^^^^^^^ `Foo` cannot be made into an object
21 note: 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
24 LL | trait Foo where u32: Q<Self> {
25 | --- ^^^^^^^ ...because it uses `Self` as a type parameter
27 | this trait cannot be made into an object...
28 = note: required because of the requirements on the impl of `CoerceUnsized<Box<dyn Foo>>` for `Box<()>`
29 = note: required by cast to type `Box<dyn Foo>`
31 error: aborting due to 2 previous errors
33 For more information about this error, try `rustc --explain E0038`.