@@ -2,7 +2,7 @@ error[E0308]: mismatched types
22 --> $DIR/fn-or-tuple-struct-without-args.rs:29:20
33 |
44LL | fn foo(a: usize, b: usize) -> usize { a }
5- | ----------------------------------- fn(usize, usize) -> usize { foo} defined here
5+ | ----------------------------------- function ` foo` defined here
66...
77LL | let _: usize = foo;
88 | ----- ^^^ expected `usize`, found fn item
@@ -20,15 +20,15 @@ error[E0308]: mismatched types
2020 --> $DIR/fn-or-tuple-struct-without-args.rs:30:16
2121 |
2222LL | struct S(usize, usize);
23- | -------- fn(usize, usize) -> S {S} defined here
23+ | -------- `S` defines a struct constructor here, which should be called
2424...
2525LL | let _: S = S;
26- | - ^ expected struct `S`, found fn item
26+ | - ^ expected struct `S`, found struct constructor
2727 | |
2828 | expected due to this
2929 |
30- = note: expected struct `S`
31- found fn item `fn(usize, usize) -> S {S}`
30+ = note: expected struct `S`
31+ found struct constructor `fn(usize, usize) -> S {S}`
3232help: use parentheses to construct this tuple struct
3333 |
3434LL | let _: S = S(/* usize */, /* usize */);
@@ -38,7 +38,7 @@ error[E0308]: mismatched types
3838 --> $DIR/fn-or-tuple-struct-without-args.rs:31:20
3939 |
4040LL | fn bar() -> usize { 42 }
41- | ----------------- fn() -> usize { bar} defined here
41+ | ----------------- function ` bar` defined here
4242...
4343LL | let _: usize = bar;
4444 | ----- ^^^ expected `usize`, found fn item
@@ -56,15 +56,15 @@ error[E0308]: mismatched types
5656 --> $DIR/fn-or-tuple-struct-without-args.rs:32:16
5757 |
5858LL | struct V();
59- | -------- fn() -> V {V} defined here
59+ | -------- `V` defines a struct constructor here, which should be called
6060...
6161LL | let _: V = V;
62- | - ^ expected struct `V`, found fn item
62+ | - ^ expected struct `V`, found struct constructor
6363 | |
6464 | expected due to this
6565 |
66- = note: expected struct `V`
67- found fn item `fn() -> V {V}`
66+ = note: expected struct `V`
67+ found struct constructor `fn() -> V {V}`
6868help: use parentheses to construct this tuple struct
6969 |
7070LL | let _: V = V();
@@ -74,7 +74,7 @@ error[E0308]: mismatched types
7474 --> $DIR/fn-or-tuple-struct-without-args.rs:33:20
7575 |
7676LL | fn baz(x: usize, y: usize) -> usize { x }
77- | ----------------------------------- fn(usize, usize) -> usize {<_ as T>:: baz} defined here
77+ | ----------------------------------- associated function ` baz` defined here
7878...
7979LL | let _: usize = T::baz;
8080 | ----- ^^^^^^ expected `usize`, found fn item
@@ -92,7 +92,7 @@ error[E0308]: mismatched types
9292 --> $DIR/fn-or-tuple-struct-without-args.rs:34:20
9393 |
9494LL | fn bat(x: usize) -> usize { 42 }
95- | ------------------------- fn(usize) -> usize {<_ as T>:: bat} defined here
95+ | ------------------------- associated function ` bat` defined here
9696...
9797LL | let _: usize = T::bat;
9898 | ----- ^^^^^^ expected `usize`, found fn item
@@ -110,15 +110,15 @@ error[E0308]: mismatched types
110110 --> $DIR/fn-or-tuple-struct-without-args.rs:35:16
111111 |
112112LL | A(usize),
113- | - fn(usize) -> E {E::A} defined here
113+ | - `A` defines an enum variant constructor here, which should be called
114114...
115115LL | let _: E = E::A;
116- | - ^^^^ expected enum `E`, found fn item
116+ | - ^^^^ expected enum `E`, found enum constructor
117117 | |
118118 | expected due to this
119119 |
120- = note: expected enum `E`
121- found fn item `fn(usize) -> E {E::A}`
120+ = note: expected enum `E`
121+ found enum constructor `fn(usize) -> E {E::A}`
122122help: use parentheses to construct this tuple variant
123123 |
124124LL | let _: E = E::A(/* usize */);
@@ -134,7 +134,7 @@ error[E0308]: mismatched types
134134 --> $DIR/fn-or-tuple-struct-without-args.rs:37:20
135135 |
136136LL | 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
138138...
139139LL | let _: usize = X::baz;
140140 | ----- ^^^^^^ expected `usize`, found fn item
@@ -152,7 +152,7 @@ error[E0308]: mismatched types
152152 --> $DIR/fn-or-tuple-struct-without-args.rs:38:20
153153 |
154154LL | fn bat(x: usize) -> usize { 42 }
155- | ------------------------- fn(usize) -> usize {<X as T>:: bat} defined here
155+ | ------------------------- associated function ` bat` defined here
156156...
157157LL | let _: usize = X::bat;
158158 | ----- ^^^^^^ expected `usize`, found fn item
@@ -170,7 +170,7 @@ error[E0308]: mismatched types
170170 --> $DIR/fn-or-tuple-struct-without-args.rs:39:20
171171 |
172172LL | fn bax(x: usize) -> usize { 42 }
173- | ------------------------- fn(usize) -> usize {<X as T>:: bax} defined here
173+ | ------------------------- associated function ` bax` defined here
174174...
175175LL | let _: usize = X::bax;
176176 | ----- ^^^^^^ expected `usize`, found fn item
@@ -188,7 +188,7 @@ error[E0308]: mismatched types
188188 --> $DIR/fn-or-tuple-struct-without-args.rs:40:20
189189 |
190190LL | fn bach(x: usize) -> usize;
191- | --------------------------- fn(usize) -> usize {<X as T>:: bach} defined here
191+ | --------------------------- associated function ` bach` defined here
192192...
193193LL | let _: usize = X::bach;
194194 | ----- ^^^^^^^ expected `usize`, found fn item
@@ -206,7 +206,7 @@ error[E0308]: mismatched types
206206 --> $DIR/fn-or-tuple-struct-without-args.rs:41:20
207207 |
208208LL | fn ban(&self) -> usize { 42 }
209- | ---------------------- for<'a> fn(&'a X) -> usize {<X as T>:: ban} defined here
209+ | ---------------------- associated function ` ban` defined here
210210...
211211LL | let _: usize = X::ban;
212212 | ----- ^^^^^^ expected `usize`, found fn item
@@ -224,7 +224,7 @@ error[E0308]: mismatched types
224224 --> $DIR/fn-or-tuple-struct-without-args.rs:42:20
225225 |
226226LL | fn bal(&self) -> usize;
227- | ----------------------- for<'a> fn(&'a X) -> usize {<X as T>:: bal} defined here
227+ | ----------------------- associated function ` bal` defined here
228228...
229229LL | let _: usize = X::bal;
230230 | ----- ^^^^^^ expected `usize`, found fn item
0 commit comments