summaryrefslogtreecommitdiffstats
path: root/tests/ui/suggestions/suggest-on-bare-closure-call.stderr
blob: e65a6eb4939d9b6c3810dbb55a74e3bacbfd7c55 (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
error[E0618]: expected function, found `()`
  --> $DIR/suggest-on-bare-closure-call.rs:6:15
   |
LL |     let _ = ||{}();
   |               ^^--
   |               |
   |               call expression requires function
   |
help: if you meant to create this closure and immediately call it, surround the closure with parentheses
   |
LL |     let _ = (||{})();
   |             +    +

error[E0618]: expected function, found `()`
  --> $DIR/suggest-on-bare-closure-call.rs:9:21
   |
LL |     let _ = async ||{}();
   |                     ^^--
   |                     |
   |                     call expression requires function
   |
help: if you meant to create this closure and immediately call it, surround the closure with parentheses
   |
LL |     let _ = (async ||{})();
   |             +          +

error: aborting due to 2 previous errors

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