@@ -2,7 +2,7 @@ error[E0308]: mismatched types
2
2
--> $DIR/fn-or-tuple-struct-without-args.rs:29:20
3
3
|
4
4
LL | fn foo(a: usize, b: usize) -> usize { a }
5
- | ----------------------------------- fn(usize, usize) -> usize { foo} defined here
5
+ | ----------------------------------- function ` foo` defined here
6
6
...
7
7
LL | let _: usize = foo;
8
8
| ----- ^^^ expected `usize`, found fn item
@@ -20,7 +20,7 @@ error[E0308]: mismatched types
20
20
--> $DIR/fn-or-tuple-struct-without-args.rs:30:16
21
21
|
22
22
LL | struct S(usize, usize);
23
- | -------- fn(usize, usize) -> S {S} defined here
23
+ | -------- `S` defines a struct constructor here, which should be called
24
24
...
25
25
LL | let _: S = S;
26
26
| - ^ expected struct `S`, found struct constructor
@@ -38,7 +38,7 @@ error[E0308]: mismatched types
38
38
--> $DIR/fn-or-tuple-struct-without-args.rs:31:20
39
39
|
40
40
LL | fn bar() -> usize { 42 }
41
- | ----------------- fn() -> usize { bar} defined here
41
+ | ----------------- function ` bar` defined here
42
42
...
43
43
LL | let _: usize = bar;
44
44
| ----- ^^^ expected `usize`, found fn item
@@ -56,7 +56,7 @@ error[E0308]: mismatched types
56
56
--> $DIR/fn-or-tuple-struct-without-args.rs:32:16
57
57
|
58
58
LL | struct V();
59
- | -------- fn() -> V {V} defined here
59
+ | -------- `V` defines a struct constructor here, which should be called
60
60
...
61
61
LL | let _: V = V;
62
62
| - ^ expected struct `V`, found struct constructor
@@ -74,7 +74,7 @@ error[E0308]: mismatched types
74
74
--> $DIR/fn-or-tuple-struct-without-args.rs:33:20
75
75
|
76
76
LL | fn baz(x: usize, y: usize) -> usize { x }
77
- | ----------------------------------- fn(usize, usize) -> usize {<_ as T>:: baz} defined here
77
+ | ----------------------------------- associated function ` baz` defined here
78
78
...
79
79
LL | let _: usize = T::baz;
80
80
| ----- ^^^^^^ expected `usize`, found fn item
@@ -92,7 +92,7 @@ error[E0308]: mismatched types
92
92
--> $DIR/fn-or-tuple-struct-without-args.rs:34:20
93
93
|
94
94
LL | fn bat(x: usize) -> usize { 42 }
95
- | ------------------------- fn(usize) -> usize {<_ as T>:: bat} defined here
95
+ | ------------------------- associated function ` bat` defined here
96
96
...
97
97
LL | let _: usize = T::bat;
98
98
| ----- ^^^^^^ expected `usize`, found fn item
@@ -110,7 +110,7 @@ error[E0308]: mismatched types
110
110
--> $DIR/fn-or-tuple-struct-without-args.rs:35:16
111
111
|
112
112
LL | A(usize),
113
- | - fn(usize) -> E {E::A} defined here
113
+ | - `A` defines an enum variant constructor here, which should be called
114
114
...
115
115
LL | let _: E = E::A;
116
116
| - ^^^^ expected enum `E`, found enum constructor
@@ -134,7 +134,7 @@ error[E0308]: mismatched types
134
134
--> $DIR/fn-or-tuple-struct-without-args.rs:37:20
135
135
|
136
136
LL | fn baz(x: usize, y: usize) -> usize { x }
137
- | ----------------------------------- fn(usize, usize) -> usize {<X as T>:: baz} defined here
137
+ | ----------------------------------- associated function ` baz` defined here
138
138
...
139
139
LL | let _: usize = X::baz;
140
140
| ----- ^^^^^^ expected `usize`, found fn item
@@ -152,7 +152,7 @@ error[E0308]: mismatched types
152
152
--> $DIR/fn-or-tuple-struct-without-args.rs:38:20
153
153
|
154
154
LL | fn bat(x: usize) -> usize { 42 }
155
- | ------------------------- fn(usize) -> usize {<X as T>:: bat} defined here
155
+ | ------------------------- associated function ` bat` defined here
156
156
...
157
157
LL | let _: usize = X::bat;
158
158
| ----- ^^^^^^ expected `usize`, found fn item
@@ -170,7 +170,7 @@ error[E0308]: mismatched types
170
170
--> $DIR/fn-or-tuple-struct-without-args.rs:39:20
171
171
|
172
172
LL | fn bax(x: usize) -> usize { 42 }
173
- | ------------------------- fn(usize) -> usize {<X as T>:: bax} defined here
173
+ | ------------------------- associated function ` bax` defined here
174
174
...
175
175
LL | let _: usize = X::bax;
176
176
| ----- ^^^^^^ expected `usize`, found fn item
@@ -188,7 +188,7 @@ error[E0308]: mismatched types
188
188
--> $DIR/fn-or-tuple-struct-without-args.rs:40:20
189
189
|
190
190
LL | fn bach(x: usize) -> usize;
191
- | --------------------------- fn(usize) -> usize {<X as T>:: bach} defined here
191
+ | --------------------------- associated function ` bach` defined here
192
192
...
193
193
LL | let _: usize = X::bach;
194
194
| ----- ^^^^^^^ expected `usize`, found fn item
@@ -206,7 +206,7 @@ error[E0308]: mismatched types
206
206
--> $DIR/fn-or-tuple-struct-without-args.rs:41:20
207
207
|
208
208
LL | fn ban(&self) -> usize { 42 }
209
- | ---------------------- for<'a> fn(&'a X) -> usize {<X as T>:: ban} defined here
209
+ | ---------------------- associated function ` ban` defined here
210
210
...
211
211
LL | let _: usize = X::ban;
212
212
| ----- ^^^^^^ expected `usize`, found fn item
@@ -224,7 +224,7 @@ error[E0308]: mismatched types
224
224
--> $DIR/fn-or-tuple-struct-without-args.rs:42:20
225
225
|
226
226
LL | fn bal(&self) -> usize;
227
- | ----------------------- for<'a> fn(&'a X) -> usize {<X as T>:: bal} defined here
227
+ | ----------------------- associated function ` bal` defined here
228
228
...
229
229
LL | let _: usize = X::bal;
230
230
| ----- ^^^^^^ expected `usize`, found fn item
0 commit comments