]>
Commit | Line | Data |
---|---|---|
f9f354fc XL |
1 | error[E0308]: mismatched types |
2 | --> $DIR/trait-with-missing-associated-type-restriction-fixable.rs:13:13 | |
3 | | | |
4 | LL | qux(x.func()) | |
923072b8 FG |
5 | | --- ^^^^^^^^ expected `usize`, found associated type |
6 | | | | |
7 | | arguments to this function are incorrect | |
f9f354fc XL |
8 | | |
9 | = note: expected type `usize` | |
10 | found associated type `<impl Trait as Trait>::A` | |
923072b8 FG |
11 | note: function defined here |
12 | --> $DIR/trait-with-missing-associated-type-restriction-fixable.rs:41:4 | |
13 | | | |
14 | LL | fn qux(_: usize) {} | |
15 | | ^^^ -------- | |
f9f354fc XL |
16 | help: consider constraining the associated type `<impl Trait as Trait>::A` to `usize` |
17 | | | |
18 | LL | fn foo<'a, T: Trait + 'a>(&self, _: impl Trait, x: impl Trait<A = usize>, _: T) { | |
94222f64 | 19 | | +++++++++++ |
f9f354fc XL |
20 | |
21 | error[E0308]: mismatched types | |
22 | --> $DIR/trait-with-missing-associated-type-restriction-fixable.rs:17:13 | |
23 | | | |
24 | LL | qux(x.func()) | |
923072b8 FG |
25 | | --- ^^^^^^^^ expected `usize`, found associated type |
26 | | | | |
27 | | arguments to this function are incorrect | |
f9f354fc XL |
28 | | |
29 | = note: expected type `usize` | |
30 | found associated type `<T as Trait>::A` | |
923072b8 FG |
31 | note: function defined here |
32 | --> $DIR/trait-with-missing-associated-type-restriction-fixable.rs:41:4 | |
33 | | | |
34 | LL | fn qux(_: usize) {} | |
35 | | ^^^ -------- | |
f9f354fc XL |
36 | help: consider constraining the associated type `<T as Trait>::A` to `usize` |
37 | | | |
38 | LL | fn ban<T>(x: T) where T: Trait<A = usize> { | |
94222f64 | 39 | | +++++++++++ |
f9f354fc XL |
40 | |
41 | error[E0308]: mismatched types | |
42 | --> $DIR/trait-with-missing-associated-type-restriction-fixable.rs:22:9 | |
43 | | | |
44 | LL | qux(x.func()) | |
923072b8 FG |
45 | | --- ^^^^^^^^ expected `usize`, found associated type |
46 | | | | |
47 | | arguments to this function are incorrect | |
f9f354fc XL |
48 | | |
49 | = note: expected type `usize` | |
50 | found associated type `<impl Trait as Trait>::A` | |
923072b8 FG |
51 | note: function defined here |
52 | --> $DIR/trait-with-missing-associated-type-restriction-fixable.rs:41:4 | |
53 | | | |
54 | LL | fn qux(_: usize) {} | |
55 | | ^^^ -------- | |
f9f354fc XL |
56 | help: consider constraining the associated type `<impl Trait as Trait>::A` to `usize` |
57 | | | |
58 | LL | fn foo<'a, T: Trait + 'a>(_: impl Trait, x: impl Trait<A = usize>, _: T) { | |
94222f64 | 59 | | +++++++++++ |
f9f354fc XL |
60 | |
61 | error[E0308]: mismatched types | |
62 | --> $DIR/trait-with-missing-associated-type-restriction-fixable.rs:26:9 | |
63 | | | |
64 | LL | qux(x.func()) | |
923072b8 FG |
65 | | --- ^^^^^^^^ expected `usize`, found associated type |
66 | | | | |
67 | | arguments to this function are incorrect | |
f9f354fc XL |
68 | | |
69 | = note: expected type `usize` | |
70 | found associated type `<T as Trait>::A` | |
923072b8 FG |
71 | note: function defined here |
72 | --> $DIR/trait-with-missing-associated-type-restriction-fixable.rs:41:4 | |
73 | | | |
74 | LL | fn qux(_: usize) {} | |
75 | | ^^^ -------- | |
f9f354fc XL |
76 | help: consider constraining the associated type `<T as Trait>::A` to `usize` |
77 | | | |
78 | LL | fn bar<T: Trait<A = usize>>(x: T) { | |
94222f64 | 79 | | +++++++++++ |
f9f354fc XL |
80 | |
81 | error[E0308]: mismatched types | |
82 | --> $DIR/trait-with-missing-associated-type-restriction-fixable.rs:30:9 | |
83 | | | |
84 | LL | qux(x.func()) | |
923072b8 FG |
85 | | --- ^^^^^^^^ expected `usize`, found associated type |
86 | | | | |
87 | | arguments to this function are incorrect | |
f9f354fc XL |
88 | | |
89 | = note: expected type `usize` | |
90 | found associated type `<impl Trait<i32> as Trait<i32>>::A` | |
923072b8 FG |
91 | note: function defined here |
92 | --> $DIR/trait-with-missing-associated-type-restriction-fixable.rs:41:4 | |
93 | | | |
94 | LL | fn qux(_: usize) {} | |
95 | | ^^^ -------- | |
f9f354fc XL |
96 | help: consider constraining the associated type `<impl Trait<i32> as Trait<i32>>::A` to `usize` |
97 | | | |
98 | LL | fn foo2(x: impl Trait<i32, A = usize>) { | |
94222f64 | 99 | | +++++++++++ |
f9f354fc XL |
100 | |
101 | error[E0308]: mismatched types | |
102 | --> $DIR/trait-with-missing-associated-type-restriction-fixable.rs:34:9 | |
103 | | | |
104 | LL | qux(x.func()) | |
923072b8 FG |
105 | | --- ^^^^^^^^ expected `usize`, found associated type |
106 | | | | |
107 | | arguments to this function are incorrect | |
f9f354fc XL |
108 | | |
109 | = note: expected type `usize` | |
110 | found associated type `<T as Trait<i32>>::A` | |
923072b8 FG |
111 | note: function defined here |
112 | --> $DIR/trait-with-missing-associated-type-restriction-fixable.rs:41:4 | |
113 | | | |
114 | LL | fn qux(_: usize) {} | |
115 | | ^^^ -------- | |
f9f354fc XL |
116 | help: consider constraining the associated type `<T as Trait<i32>>::A` to `usize` |
117 | | | |
118 | LL | fn bar2<T: Trait<i32, A = usize>>(x: T) { | |
94222f64 | 119 | | +++++++++++ |
f9f354fc XL |
120 | |
121 | error[E0308]: mismatched types | |
122 | --> $DIR/trait-with-missing-associated-type-restriction-fixable.rs:38:9 | |
123 | | | |
124 | LL | qux(x.func()) | |
923072b8 FG |
125 | | --- ^^^^^^^^ expected `usize`, found associated type |
126 | | | | |
127 | | arguments to this function are incorrect | |
f9f354fc XL |
128 | | |
129 | = note: expected type `usize` | |
130 | found associated type `<T as Trait>::A` | |
923072b8 FG |
131 | note: function defined here |
132 | --> $DIR/trait-with-missing-associated-type-restriction-fixable.rs:41:4 | |
133 | | | |
134 | LL | fn qux(_: usize) {} | |
135 | | ^^^ -------- | |
f9f354fc XL |
136 | help: consider constraining the associated type `<T as Trait>::A` to `usize` |
137 | | | |
138 | LL | fn ban<T>(x: T) where T: Trait<A = usize> { | |
94222f64 | 139 | | +++++++++++ |
f9f354fc XL |
140 | |
141 | error: aborting due to 7 previous errors | |
142 | ||
143 | For more information about this error, try `rustc --explain E0308`. |