mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-23 23:34:48 +00:00
30 lines
920 B
Plaintext
30 lines
920 B
Plaintext
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`.
|