rust/tests/ui/traits/object/constrain-via-unnecessary-b...

20 lines
927 B
Plaintext

warning: unnecessary associated type bound for dyn-incompatible associated type
--> $DIR/constrain-via-unnecessary-bound.rs:17:26
|
LL | impl Other for dyn Trait<Assoc = ()> {}
| ^^^^^^^^^^ help: remove this bound
|
= note: this associated type has a `where Self: Sized` bound, and while the associated type can be specified, it cannot be used because trait objects are never `Sized`
= note: `#[warn(unused_associated_type_bounds)]` on by default
warning: unnecessary associated type bound for dyn-incompatible associated type
--> $DIR/constrain-via-unnecessary-bound.rs:21:19
|
LL | impl<T> dyn Trait<Assoc = T> {}
| ^^^^^^^^^ help: remove this bound
|
= note: this associated type has a `where Self: Sized` bound, and while the associated type can be specified, it cannot be used because trait objects are never `Sized`
warning: 2 warnings emitted