summaryrefslogtreecommitdiffstats
path: root/tests/ui/issues/issue-21701.stderr
blob: 9f1fe7dde735a22a2853cfb3568bcc3d473263d0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
error[E0618]: expected function, found `U`
  --> $DIR/issue-21701.rs:2:13
   |
LL | fn foo<U>(t: U) {
   |           - `t` has type `U`
LL |     let y = t();
   |             ^--
   |             |
   |             call expression requires function

error[E0618]: expected function, found struct `Bar`
  --> $DIR/issue-21701.rs:9:13
   |
LL | struct Bar;
   | ---------- struct `Bar` defined here
...
LL |     let f = Bar();
   |             ^^^--
   |             |
   |             call expression requires function
   |
help: `Bar` is a unit struct, and does not take parentheses to be constructed
   |
LL -     let f = Bar();
LL +     let f = Bar;
   |

error: aborting due to 2 previous errors

For more information about this error, try `rustc --explain E0618`.