]> git.lizzy.rs Git - rust.git/blob - tests/ui/suggestions/suggest-on-bare-closure-call.stderr
Rollup merge of #107264 - ferrocene:pa-private-items, r=Mark-Simulacrum
[rust.git] / tests / ui / suggestions / suggest-on-bare-closure-call.stderr
1 error[E0618]: expected function, found `()`
2   --> $DIR/suggest-on-bare-closure-call.rs:6:15
3    |
4 LL |     let _ = ||{}();
5    |               ^^--
6    |               |
7    |               call expression requires function
8    |
9 help: if you meant to create this closure and immediately call it, surround the closure with parentheses
10    |
11 LL |     let _ = (||{})();
12    |             +    +
13
14 error[E0618]: expected function, found `()`
15   --> $DIR/suggest-on-bare-closure-call.rs:9:21
16    |
17 LL |     let _ = async ||{}();
18    |                     ^^--
19    |                     |
20    |                     call expression requires function
21    |
22 help: if you meant to create this closure and immediately call it, surround the closure with parentheses
23    |
24 LL |     let _ = (async ||{})();
25    |             +          +
26
27 error: aborting due to 2 previous errors
28
29 For more information about this error, try `rustc --explain E0618`.