2018-07-15 16:11:54 -05:00
|
|
|
error[E0618]: expected function, found `U`
|
2018-12-25 09:56:47 -06:00
|
|
|
--> $DIR/issue-21701.rs:2:13
|
2018-07-15 16:11:54 -05:00
|
|
|
|
|
|
|
|
LL | fn foo<U>(t: U) {
|
2021-02-17 08:50:59 -06:00
|
|
|
| - `t` has type `U`
|
2018-07-15 16:11:54 -05:00
|
|
|
LL | let y = t();
|
2018-11-10 22:46:05 -06:00
|
|
|
| ^--
|
|
|
|
| |
|
|
|
|
| call expression requires function
|
2018-07-15 16:11:54 -05:00
|
|
|
|
2022-07-16 17:15:41 -05:00
|
|
|
error[E0618]: expected function, found struct `Bar`
|
2018-12-25 09:56:47 -06:00
|
|
|
--> $DIR/issue-21701.rs:9:13
|
2018-07-15 16:11:54 -05:00
|
|
|
|
|
|
|
|
LL | struct Bar;
|
2022-07-16 17:15:41 -05:00
|
|
|
| ---------- struct `Bar` defined here
|
2018-07-15 16:11:54 -05:00
|
|
|
...
|
|
|
|
LL | let f = Bar();
|
2018-11-10 22:46:05 -06:00
|
|
|
| ^^^--
|
|
|
|
| |
|
|
|
|
| call expression requires function
|
2022-07-16 17:15:41 -05:00
|
|
|
|
|
|
|
|
help: `Bar` is a unit struct, and does not take parentheses to be constructed
|
|
|
|
|
|
|
|
|
LL - let f = Bar();
|
|
|
|
LL + let f = Bar;
|
|
|
|
|
|
2018-07-15 16:11:54 -05:00
|
|
|
|
|
|
|
error: aborting due to 2 previous errors
|
|
|
|
|
|
|
|
For more information about this error, try `rustc --explain E0618`.
|