fork/rust

git clone https://git.julia.blue/fork/rust

borsAuto merge of #103046 - JanBeh:PR_clarify_cmp_terminology, r=workingjubilee3bcad65fbf6

master
768 B30 linesraw
1error[E0618]: expected function, found `U`
2  --> $DIR/issue-21701.rs:2:13
3   |
4LL | fn foo<U>(t: U) {
5   |           - `t` has type `U`
6LL |     let y = t();
7   |             ^--
8   |             |
9   |             call expression requires function
10
11error[E0618]: expected function, found struct `Bar`
12  --> $DIR/issue-21701.rs:9:13
13   |
14LL | struct Bar;
15   | ---------- struct `Bar` defined here
16...
17LL |     let f = Bar();
18   |             ^^^--
19   |             |
20   |             call expression requires function
21   |
22help: `Bar` is a unit struct, and does not take parentheses to be constructed
23   |
24LL -     let f = Bar();
25LL +     let f = Bar;
26   |
27
28error: aborting due to 2 previous errors
29
30For more information about this error, try `rustc --explain E0618`.