1 error[E0277]: the trait bound `[closure@$DIR/const-eval-select-bad.rs:7:27: 7:29]: FnOnce<()>` is not satisfied
2 --> $DIR/const-eval-select-bad.rs:7:27
4 LL | const_eval_select((), || {}, || {});
5 | ----------------- ^^^^^ expected an `FnOnce<()>` closure, found `[closure@$DIR/const-eval-select-bad.rs:7:27: 7:29]`
7 | required by a bound introduced by this call
9 = help: the trait `~const FnOnce<()>` is not implemented for `[closure@$DIR/const-eval-select-bad.rs:7:27: 7:29]`
10 note: the trait `FnOnce<()>` is implemented for `[closure@$DIR/const-eval-select-bad.rs:7:27: 7:29]`, but that implementation is not `const`
11 --> $DIR/const-eval-select-bad.rs:7:27
13 LL | const_eval_select((), || {}, || {});
15 = note: wrap the `[closure@$DIR/const-eval-select-bad.rs:7:27: 7:29]` in a closure with no arguments: `|| { /* code */ }`
16 note: required by a bound in `const_eval_select`
17 --> $SRC_DIR/core/src/intrinsics.rs:LL:COL
19 LL | F: ~const FnOnce<ARG, Output = RET>,
20 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `const_eval_select`
22 error[E0277]: the trait bound `{integer}: FnOnce<()>` is not satisfied
23 --> $DIR/const-eval-select-bad.rs:9:27
25 LL | const_eval_select((), 42, 0xDEADBEEF);
26 | ----------------- ^^ expected an `FnOnce<()>` closure, found `{integer}`
28 | required by a bound introduced by this call
30 = help: the trait `~const FnOnce<()>` is not implemented for `{integer}`
31 = note: wrap the `{integer}` in a closure with no arguments: `|| { /* code */ }`
32 note: required by a bound in `const_eval_select`
33 --> $SRC_DIR/core/src/intrinsics.rs:LL:COL
35 LL | F: ~const FnOnce<ARG, Output = RET>,
36 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `const_eval_select`
38 error[E0277]: expected a `FnOnce<()>` closure, found `{integer}`
39 --> $DIR/const-eval-select-bad.rs:9:31
41 LL | const_eval_select((), 42, 0xDEADBEEF);
42 | ----------------- ^^^^^^^^^^ expected an `FnOnce<()>` closure, found `{integer}`
44 | required by a bound introduced by this call
46 = help: the trait `FnOnce<()>` is not implemented for `{integer}`
47 = note: wrap the `{integer}` in a closure with no arguments: `|| { /* code */ }`
48 note: required by a bound in `const_eval_select`
49 --> $SRC_DIR/core/src/intrinsics.rs:LL:COL
51 LL | G: FnOnce<ARG, Output = RET> + ~const Destruct,
52 | ^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `const_eval_select`
54 error[E0271]: expected `fn(i32) -> bool {bar}` to be a fn item that returns `i32`, but it returns `bool`
55 --> $DIR/const-eval-select-bad.rs:29:5
57 LL | const_eval_select((1,), foo, bar);
58 | ^^^^^^^^^^^^^^^^^ expected `i32`, found `bool`
60 note: required by a bound in `const_eval_select`
61 --> $SRC_DIR/core/src/intrinsics.rs:LL:COL
63 LL | G: FnOnce<ARG, Output = RET> + ~const Destruct,
64 | ^^^^^^^^^^^^ required by this bound in `const_eval_select`
66 error[E0631]: type mismatch in function arguments
67 --> $DIR/const-eval-select-bad.rs:34:32
69 LL | const fn foo(n: i32) -> i32 {
70 | --------------------------- found signature defined here
72 LL | const_eval_select((true,), foo, baz);
73 | ----------------- ^^^ expected due to this
75 | required by a bound introduced by this call
77 = note: expected function signature `fn(bool) -> _`
78 found function signature `fn(i32) -> _`
79 note: required by a bound in `const_eval_select`
80 --> $SRC_DIR/core/src/intrinsics.rs:LL:COL
82 LL | F: ~const FnOnce<ARG, Output = RET>,
83 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `const_eval_select`
85 error: aborting due to 5 previous errors
87 Some errors have detailed explanations: E0271, E0277, E0631.
88 For more information about an error, try `rustc --explain E0271`.