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