2020-09-02 10:40:56 +03:00
|
|
|
error[E0277]: expected a `FnOnce<()>` closure, found `{integer}`
|
2019-09-15 21:58:20 -07:00
|
|
|
--> $DIR/closure-expected.rs:3:23
|
2018-08-12 12:21:53 -07:00
|
|
|
|
|
|
|
|
LL | let y = x.or_else(4);
|
2021-09-07 11:30:53 +00:00
|
|
|
| ------- ^ expected an `FnOnce<()>` closure, found `{integer}`
|
|
|
|
| |
|
|
|
|
| required by a bound introduced by this call
|
2018-08-12 12:21:53 -07:00
|
|
|
|
|
2020-09-02 10:40:56 +03:00
|
|
|
= help: the trait `FnOnce<()>` is not implemented for `{integer}`
|
2020-07-23 21:52:48 +09:00
|
|
|
= note: wrap the `{integer}` in a closure with no arguments: `|| { /* code */ }`
|
2021-10-05 23:04:09 +00:00
|
|
|
note: required by a bound in `Option::<T>::or_else`
|
|
|
|
--> $SRC_DIR/core/src/option.rs:LL:COL
|
2018-08-12 12:21:53 -07:00
|
|
|
|
|
|
|
error: aborting due to previous error
|
|
|
|
|
|
|
|
For more information about this error, try `rustc --explain E0277`.
|