2024-11-20 22:19:36 +00:00
|
|
|
error[E0038]: the trait `X` is not dyn compatible
|
2024-10-09 21:31:01 +00:00
|
|
|
--> $DIR/bounds.rs:7:15
|
2020-06-28 16:36:41 +00:00
|
|
|
|
|
2020-10-16 00:23:45 +00:00
|
|
|
LL | fn f() -> Box<dyn X<U = u32>> {
|
2024-11-20 22:19:36 +00:00
|
|
|
| ^^^^^^^^^^^^^^ `X` is not dyn compatible
|
2020-10-16 00:23:45 +00:00
|
|
|
|
|
2024-11-20 22:19:36 +00:00
|
|
|
note: for a trait to be dyn compatible it needs to allow building a vtable
|
2025-01-22 04:14:07 +00:00
|
|
|
for more information, visit <https://doc.rust-lang.org/reference/items/traits.html#dyn-compatibility>
|
2024-10-09 21:31:01 +00:00
|
|
|
--> $DIR/bounds.rs:4:13
|
2020-10-16 00:23:45 +00:00
|
|
|
|
|
2020-06-28 16:36:41 +00:00
|
|
|
LL | trait X {
|
2024-11-20 22:19:36 +00:00
|
|
|
| - this trait is not dyn compatible...
|
2020-06-28 16:36:41 +00:00
|
|
|
LL | type U: PartialEq<Self>;
|
2020-10-20 00:57:18 +00:00
|
|
|
| ^^^^^^^^^^^^^^^ ...because it uses `Self` as a type parameter
|
2020-06-28 16:36:41 +00:00
|
|
|
|
2023-11-21 15:44:16 +00:00
|
|
|
error: aborting due to 1 previous error
|
2020-06-28 16:36:41 +00:00
|
|
|
|
|
|
|
For more information about this error, try `rustc --explain E0038`.
|