64 lines
2.6 KiB
Text
64 lines
2.6 KiB
Text
|
error[E0277]: expected a `FnOnce<((),)>` closure, found `[closure@$DIR/const-eval-select-bad.rs:6:27: 6:34]`
|
||
|
--> $DIR/const-eval-select-bad.rs:6:36
|
||
|
|
|
||
|
LL | const_eval_select((), |()| {}, |()| {});
|
||
|
| ----------------- ^^^^^^^ expected an `FnOnce<((),)>` closure, found `[closure@$DIR/const-eval-select-bad.rs:6:27: 6:34]`
|
||
|
| |
|
||
|
| required by a bound introduced by this call
|
||
|
|
|
||
|
= help: the trait `FnOnce<((),)>` is not implemented for `[closure@$DIR/const-eval-select-bad.rs:6:27: 6:34]`
|
||
|
note: required by a bound in `const_eval_select`
|
||
|
--> $SRC_DIR/core/src/intrinsics.rs:LL:COL
|
||
|
|
|
||
|
LL | F: ~const FnOnce(ARG) -> RET,
|
||
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `const_eval_select`
|
||
|
|
||
|
error[E0277]: expected a `FnOnce<((),)>` closure, found `{integer}`
|
||
|
--> $DIR/const-eval-select-bad.rs:8:31
|
||
|
|
|
||
|
LL | const_eval_select((), 42, 0xDEADBEEF);
|
||
|
| ----------------- ^^^^^^^^^^ expected an `FnOnce<((),)>` closure, found `{integer}`
|
||
|
| |
|
||
|
| required by a bound introduced by this call
|
||
|
|
|
||
|
= help: the trait `FnOnce<((),)>` is not implemented for `{integer}`
|
||
|
note: required by a bound in `const_eval_select`
|
||
|
--> $SRC_DIR/core/src/intrinsics.rs:LL:COL
|
||
|
|
|
||
|
LL | F: ~const FnOnce(ARG) -> RET,
|
||
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `const_eval_select`
|
||
|
|
||
|
error[E0271]: type mismatch resolving `<fn((i32,)) -> bool {bar} as FnOnce<((i32,),)>>::Output == i32`
|
||
|
--> $DIR/const-eval-select-bad.rs:27:5
|
||
|
|
|
||
|
LL | const_eval_select((1,), foo, bar);
|
||
|
| ^^^^^^^^^^^^^^^^^ expected `i32`, found `bool`
|
||
|
|
|
||
|
note: required by a bound in `const_eval_select`
|
||
|
--> $SRC_DIR/core/src/intrinsics.rs:LL:COL
|
||
|
|
|
||
|
LL | G: FnOnce(ARG) -> RET + ~const Drop,
|
||
|
| ^^^ required by this bound in `const_eval_select`
|
||
|
|
||
|
error[E0631]: type mismatch in function arguments
|
||
|
--> $DIR/const-eval-select-bad.rs:32:37
|
||
|
|
|
||
|
LL | const fn foo((n,): (i32,)) -> i32 {
|
||
|
| --------------------------------- found signature of `fn((i32,)) -> _`
|
||
|
...
|
||
|
LL | const_eval_select((true,), foo, baz);
|
||
|
| ----------------- ^^^ expected signature of `fn((bool,)) -> _`
|
||
|
| |
|
||
|
| required by a bound introduced by this call
|
||
|
|
|
||
|
note: required by a bound in `const_eval_select`
|
||
|
--> $SRC_DIR/core/src/intrinsics.rs:LL:COL
|
||
|
|
|
||
|
LL | F: ~const FnOnce(ARG) -> RET,
|
||
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `const_eval_select`
|
||
|
|
||
|
error: aborting due to 4 previous errors
|
||
|
|
||
|
Some errors have detailed explanations: E0271, E0277, E0631.
|
||
|
For more information about an error, try `rustc --explain E0271`.
|