1 error[E0308]: mismatched types
2 --> $DIR/trait-with-missing-associated-type-restriction-fixable.rs:13:13
5 | ^^^^^^^^ expected `usize`, found associated type
7 = note: expected type `usize`
8 found associated type `<impl Trait as Trait>::A`
9 help: consider constraining the associated type `<impl Trait as Trait>::A` to `usize`
11 LL | fn foo<'a, T: Trait + 'a>(&self, _: impl Trait, x: impl Trait<A = usize>, _: T) {
14 error[E0308]: mismatched types
15 --> $DIR/trait-with-missing-associated-type-restriction-fixable.rs:17:13
18 | ^^^^^^^^ expected `usize`, found associated type
20 = note: expected type `usize`
21 found associated type `<T as Trait>::A`
22 help: consider constraining the associated type `<T as Trait>::A` to `usize`
24 LL | fn ban<T>(x: T) where T: Trait<A = usize> {
27 error[E0308]: mismatched types
28 --> $DIR/trait-with-missing-associated-type-restriction-fixable.rs:22:9
31 | ^^^^^^^^ expected `usize`, found associated type
33 = note: expected type `usize`
34 found associated type `<impl Trait as Trait>::A`
35 help: consider constraining the associated type `<impl Trait as Trait>::A` to `usize`
37 LL | fn foo<'a, T: Trait + 'a>(_: impl Trait, x: impl Trait<A = usize>, _: T) {
40 error[E0308]: mismatched types
41 --> $DIR/trait-with-missing-associated-type-restriction-fixable.rs:26:9
44 | ^^^^^^^^ expected `usize`, found associated type
46 = note: expected type `usize`
47 found associated type `<T as Trait>::A`
48 help: consider constraining the associated type `<T as Trait>::A` to `usize`
50 LL | fn bar<T: Trait<A = usize>>(x: T) {
53 error[E0308]: mismatched types
54 --> $DIR/trait-with-missing-associated-type-restriction-fixable.rs:30:9
57 | ^^^^^^^^ expected `usize`, found associated type
59 = note: expected type `usize`
60 found associated type `<impl Trait<i32> as Trait<i32>>::A`
61 help: consider constraining the associated type `<impl Trait<i32> as Trait<i32>>::A` to `usize`
63 LL | fn foo2(x: impl Trait<i32, A = usize>) {
66 error[E0308]: mismatched types
67 --> $DIR/trait-with-missing-associated-type-restriction-fixable.rs:34:9
70 | ^^^^^^^^ expected `usize`, found associated type
72 = note: expected type `usize`
73 found associated type `<T as Trait<i32>>::A`
74 help: consider constraining the associated type `<T as Trait<i32>>::A` to `usize`
76 LL | fn bar2<T: Trait<i32, A = usize>>(x: T) {
79 error[E0308]: mismatched types
80 --> $DIR/trait-with-missing-associated-type-restriction-fixable.rs:38:9
83 | ^^^^^^^^ expected `usize`, found associated type
85 = note: expected type `usize`
86 found associated type `<T as Trait>::A`
87 help: consider constraining the associated type `<T as Trait>::A` to `usize`
89 LL | fn ban<T>(x: T) where T: Trait<A = usize> {
92 error: aborting due to 7 previous errors
94 For more information about this error, try `rustc --explain E0308`.