2023-10-05 01:50:00 +00:00
|
|
|
error[E0277]: expected a `FnOnce()` closure, found `{integer}`
|
2019-09-16 04:58:20 +00:00
|
|
|
--> $DIR/closure-expected.rs:3:23
|
2018-08-12 19:21:53 +00:00
|
|
|
|
|
|
|
|
LL | let y = x.or_else(4);
|
2023-10-05 01:50:00 +00:00
|
|
|
| ------- ^ expected an `FnOnce()` closure, found `{integer}`
|
2021-09-07 11:30:53 +00:00
|
|
|
| |
|
|
|
|
| required by a bound introduced by this call
|
2018-08-12 19:21:53 +00:00
|
|
|
|
|
2024-05-29 21:42:40 +00:00
|
|
|
= help: the trait `FnOnce()` is not implemented for `{integer}`
|
2020-07-23 12:52:48 +00: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 19:21:53 +00:00
|
|
|
|
2023-11-21 15:44:16 +00:00
|
|
|
error: aborting due to 1 previous error
|
2018-08-12 19:21:53 +00:00
|
|
|
|
|
|
|
For more information about this error, try `rustc --explain E0277`.
|