2024-10-09 23:31:01 +02:00
|
|
|
// Traits with bounds mentioning `Self` are dyn-incompatible.
|
2020-06-28 17:36:41 +01:00
|
|
|
|
|
|
|
|
trait X {
|
|
|
|
|
type U: PartialEq<Self>;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
fn f() -> Box<dyn X<U = u32>> {
|
2024-11-20 14:19:36 -08:00
|
|
|
//~^ ERROR the trait `X` is not dyn compatible
|
2020-06-28 17:36:41 +01:00
|
|
|
loop {}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
fn main() {}
|