1 error[E0308]: mismatched types
2 --> $DIR/trait-with-missing-associated-type-restriction.rs:10:31
4 LL | fn funq(&self) -> Self::A {}
5 | ^^ expected associated type, found `()`
7 = note: expected associated type `<Self as Trait<T>>::A`
9 help: a method is available that returns `<Self as Trait<T>>::A`
10 --> $DIR/trait-with-missing-associated-type-restriction.rs:8:5
12 LL | fn func(&self) -> Self::A;
13 | ^^^^^^^^^^^^^^^^^^^^^^^^^^ consider calling `Trait::func`
15 error[E0308]: mismatched types
16 --> $DIR/trait-with-missing-associated-type-restriction.rs:14:9
19 | --- ^^^^^^^^ expected `usize`, found associated type
21 | arguments to this function are incorrect
23 = note: expected type `usize`
24 found associated type `<impl Trait as Trait>::A`
25 note: function defined here
26 --> $DIR/trait-with-missing-associated-type-restriction.rs:42:4
28 LL | fn qux(_: usize) {}
30 help: consider constraining the associated type `<impl Trait as Trait>::A` to `usize`
32 LL | fn foo(_: impl Trait, x: impl Trait<A = usize>) {
35 error[E0308]: mismatched types
36 --> $DIR/trait-with-missing-associated-type-restriction.rs:18:9
39 | --- ^^^^^^^^ expected `usize`, found associated type
41 | arguments to this function are incorrect
43 = note: expected type `usize`
44 found associated type `<T as Trait>::A`
45 note: function defined here
46 --> $DIR/trait-with-missing-associated-type-restriction.rs:42:4
48 LL | fn qux(_: usize) {}
50 help: consider constraining the associated type `<T as Trait>::A` to `usize`
52 LL | fn bar<T: Trait<A = usize>>(x: T) {
55 error[E0308]: mismatched types
56 --> $DIR/trait-with-missing-associated-type-restriction.rs:22:9
59 | --- ^^^^^^^^ expected `usize`, found associated type
61 | arguments to this function are incorrect
63 = note: expected type `usize`
64 found associated type `<impl Trait<i32> as Trait<i32>>::A`
65 note: function defined here
66 --> $DIR/trait-with-missing-associated-type-restriction.rs:42:4
68 LL | fn qux(_: usize) {}
70 help: consider constraining the associated type `<impl Trait<i32> as Trait<i32>>::A` to `usize`
72 LL | fn foo2(x: impl Trait<i32, A = usize>) {
75 error[E0308]: mismatched types
76 --> $DIR/trait-with-missing-associated-type-restriction.rs:26:12
79 | ---- ^ expected associated type, found integer
81 | arguments to this function are incorrect
83 = note: expected associated type `<T as Trait<i32>>::A`
84 found type `{integer}`
85 help: some methods are available that return `<T as Trait<i32>>::A`
86 --> $DIR/trait-with-missing-associated-type-restriction.rs:8:5
88 LL | fn func(&self) -> Self::A;
89 | ^^^^^^^^^^^^^^^^^^^^^^^^^^ consider calling `Trait::func`
90 LL | fn funk(&self, _: Self::A);
91 LL | fn funq(&self) -> Self::A {}
92 | ^^^^^^^^^^^^^^^^^^^^^^^^^ consider calling `Trait::funq`
93 note: associated function defined here
94 --> $DIR/trait-with-missing-associated-type-restriction.rs:9:8
96 LL | fn funk(&self, _: Self::A);
98 help: consider constraining the associated type `<T as Trait<i32>>::A` to `{integer}`
100 LL | fn bar2<T: Trait<i32, A = {integer}>>(x: T) {
103 error[E0308]: mismatched types
104 --> $DIR/trait-with-missing-associated-type-restriction.rs:27:9
107 | --- ^^^^^^^^ expected `usize`, found associated type
109 | arguments to this function are incorrect
111 = note: expected type `usize`
112 found associated type `<T as Trait<i32>>::A`
113 note: function defined here
114 --> $DIR/trait-with-missing-associated-type-restriction.rs:42:4
116 LL | fn qux(_: usize) {}
118 help: consider constraining the associated type `<T as Trait<i32>>::A` to `usize`
120 LL | fn bar2<T: Trait<i32, A = usize>>(x: T) {
123 error[E0308]: mismatched types
124 --> $DIR/trait-with-missing-associated-type-restriction.rs:31:9
126 LL | fn baz<D: std::fmt::Debug, T: Trait<A = D>>(x: T) {
127 | - this type parameter
129 | --- ^^^^^^^^ expected `usize`, found type parameter `D`
131 | arguments to this function are incorrect
133 = note: expected type `usize`
134 found type parameter `D`
135 note: function defined here
136 --> $DIR/trait-with-missing-associated-type-restriction.rs:42:4
138 LL | fn qux(_: usize) {}
141 error[E0308]: mismatched types
142 --> $DIR/trait-with-missing-associated-type-restriction.rs:35:9
145 | --- ^^^^^^^^ expected `usize`, found `()`
147 | arguments to this function are incorrect
149 note: function defined here
150 --> $DIR/trait-with-missing-associated-type-restriction.rs:42:4
152 LL | fn qux(_: usize) {}
155 error[E0308]: mismatched types
156 --> $DIR/trait-with-missing-associated-type-restriction.rs:39:9
159 | --- ^^^^^^^^ expected `usize`, found associated type
161 | arguments to this function are incorrect
163 = note: expected type `usize`
164 found associated type `<T as Trait>::A`
165 note: function defined here
166 --> $DIR/trait-with-missing-associated-type-restriction.rs:42:4
168 LL | fn qux(_: usize) {}
170 help: consider constraining the associated type `<T as Trait>::A` to `usize`
172 LL | fn ban<T>(x: T) where T: Trait<A = usize> {
175 error: aborting due to 9 previous errors
177 For more information about this error, try `rustc --explain E0308`.