help: consider constraining the associated type `<impl Trait as Trait>::A` to `usize`
|
LL | fn foo(_: impl Trait, x: impl Trait<A = usize>) {
- | ^^^^^^^^^^^
+ | +++++++++++
error[E0308]: mismatched types
--> $DIR/trait-with-missing-associated-type-restriction.rs:18:9
help: consider constraining the associated type `<T as Trait>::A` to `usize`
|
LL | fn bar<T: Trait<A = usize>>(x: T) {
- | ^^^^^^^^^^^
+ | +++++++++++
error[E0308]: mismatched types
--> $DIR/trait-with-missing-associated-type-restriction.rs:22:9
help: consider constraining the associated type `<impl Trait<i32> as Trait<i32>>::A` to `usize`
|
LL | fn foo2(x: impl Trait<i32, A = usize>) {
- | ^^^^^^^^^^^
+ | +++++++++++
error[E0308]: mismatched types
--> $DIR/trait-with-missing-associated-type-restriction.rs:26:12
help: consider constraining the associated type `<T as Trait<i32>>::A` to `{integer}`
|
LL | fn bar2<T: Trait<i32, A = {integer}>>(x: T) {
- | ^^^^^^^^^^^^^^^
+ | +++++++++++++++
error[E0308]: mismatched types
--> $DIR/trait-with-missing-associated-type-restriction.rs:27:9
help: consider constraining the associated type `<T as Trait<i32>>::A` to `usize`
|
LL | fn bar2<T: Trait<i32, A = usize>>(x: T) {
- | ^^^^^^^^^^^
+ | +++++++++++
error[E0308]: mismatched types
--> $DIR/trait-with-missing-associated-type-restriction.rs:31:9
help: consider constraining the associated type `<T as Trait>::A` to `usize`
|
LL | fn ban<T>(x: T) where T: Trait<A = usize> {
- | ^^^^^^^^^^^
+ | +++++++++++
error: aborting due to 9 previous errors