fork/rust

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

borsAuto merge of #67350 - Mark-Simulacrum:stable-next, r=Mark-Simulacrum73528e339aa

1.40.0
616 B24 linesraw
1error[E0618]: expected function, found `U`
2  --> $DIR/issue-21701.rs:2:13
3   |
4LL | fn foo<U>(t: U) {
5   |           - `U` defined here
6LL |     let y = t();
7   |             ^--
8   |             |
9   |             call expression requires function
10
11error[E0618]: expected function, found `Bar`
12  --> $DIR/issue-21701.rs:9:13
13   |
14LL | struct Bar;
15   | ----------- `Bar` defined here
16...
17LL |     let f = Bar();
18   |             ^^^--
19   |             |
20   |             call expression requires function
21
22error: aborting due to 2 previous errors
23
24For more information about this error, try `rustc --explain E0618`.