fork/rust

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

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

master
920 B29 linesraw
1error[E0618]: expected function, found `()`
2  --> $DIR/suggest-on-bare-closure-call.rs:6:15
3   |
4LL |     let _ = ||{}();
5   |               ^^--
6   |               |
7   |               call expression requires function
8   |
9help: if you meant to create this closure and immediately call it, surround the closure with parentheses
10   |
11LL |     let _ = (||{})();
12   |             +    +
13
14error[E0618]: expected function, found `()`
15  --> $DIR/suggest-on-bare-closure-call.rs:9:21
16   |
17LL |     let _ = async ||{}();
18   |                     ^^--
19   |                     |
20   |                     call expression requires function
21   |
22help: if you meant to create this closure and immediately call it, surround the closure with parentheses
23   |
24LL |     let _ = (async ||{})();
25   |             +          +
26
27error: aborting due to 2 previous errors
28
29For more information about this error, try `rustc --explain E0618`.