1 error[E0277]: expected a `FnOnce<((),)>` closure, found `[closure@$DIR/const-eval-select-bad.rs:6:27: 6:34]`
2 --> $DIR/const-eval-select-bad.rs:6:36
4 LL | const_eval_select((), |()| {}, |()| {});
5 | ----------------- ^^^^^^^ expected an `FnOnce<((),)>` closure, found `[closure@$DIR/const-eval-select-bad.rs:6:27: 6:34]`
7 | required by a bound introduced by this call
9 = help: the trait `FnOnce<((),)>` is not implemented for `[closure@$DIR/const-eval-select-bad.rs:6:27: 6:34]`
10 note: required by a bound in `const_eval_select`
11 --> $SRC_DIR/core/src/intrinsics.rs:LL:COL
13 LL | F: ~const FnOnce(ARG) -> RET,
14 | ^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `const_eval_select`
16 error[E0277]: expected a `FnOnce<((),)>` closure, found `{integer}`
17 --> $DIR/const-eval-select-bad.rs:8:31
19 LL | const_eval_select((), 42, 0xDEADBEEF);
20 | ----------------- ^^^^^^^^^^ expected an `FnOnce<((),)>` closure, found `{integer}`
22 | required by a bound introduced by this call
24 = help: the trait `FnOnce<((),)>` is not implemented for `{integer}`
25 note: required by a bound in `const_eval_select`
26 --> $SRC_DIR/core/src/intrinsics.rs:LL:COL
28 LL | F: ~const FnOnce(ARG) -> RET,
29 | ^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `const_eval_select`
31 error[E0271]: type mismatch resolving `<fn((i32,)) -> bool {bar} as FnOnce<((i32,),)>>::Output == i32`
32 --> $DIR/const-eval-select-bad.rs:27:5
34 LL | const_eval_select((1,), foo, bar);
35 | ^^^^^^^^^^^^^^^^^ expected `i32`, found `bool`
37 note: required by a bound in `const_eval_select`
38 --> $SRC_DIR/core/src/intrinsics.rs:LL:COL
40 LL | G: FnOnce(ARG) -> RET + ~const Drop,
41 | ^^^ required by this bound in `const_eval_select`
43 error[E0631]: type mismatch in function arguments
44 --> $DIR/const-eval-select-bad.rs:32:37
46 LL | const fn foo((n,): (i32,)) -> i32 {
47 | --------------------------------- found signature of `fn((i32,)) -> _`
49 LL | const_eval_select((true,), foo, baz);
50 | ----------------- ^^^ expected signature of `fn((bool,)) -> _`
52 | required by a bound introduced by this call
54 note: required by a bound in `const_eval_select`
55 --> $SRC_DIR/core/src/intrinsics.rs:LL:COL
57 LL | F: ~const FnOnce(ARG) -> RET,
58 | ^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `const_eval_select`
60 error: aborting due to 4 previous errors
62 Some errors have detailed explanations: E0271, E0277, E0631.
63 For more information about an error, try `rustc --explain E0271`.