1 error[E0277]: the trait bound `[closure@$DIR/const-eval-select-bad.rs:6:27: 6:32]: ~const FnOnce<()>` is not satisfied
2 --> $DIR/const-eval-select-bad.rs:6:27
4 LL | const_eval_select((), || {}, || {});
5 | ----------------- ^^^^^ expected an `FnOnce<()>` closure, found `[closure@$DIR/const-eval-select-bad.rs:6:27: 6:32]`
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:6:27: 6:32]`
10 note: the trait `FnOnce<()>` is implemented for `[closure@$DIR/const-eval-select-bad.rs:6:27: 6:32]`, but that implementation is not `const`
11 --> $DIR/const-eval-select-bad.rs:6:27
13 LL | const_eval_select((), || {}, || {});
15 = note: wrap the `[closure@$DIR/const-eval-select-bad.rs:6:27: 6:32]` 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}: ~const FnOnce<()>` is not satisfied
23 --> $DIR/const-eval-select-bad.rs:8: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:8: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 Drop,
52 | ^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `const_eval_select`
54 error[E0271]: type mismatch resolving `<fn(i32) -> bool {bar} as FnOnce<(i32,)>>::Output == i32`
55 --> $DIR/const-eval-select-bad.rs:28: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 Drop,
64 | ^^^^^^^^^^^^ required by this bound in `const_eval_select`
66 error[E0631]: type mismatch in function arguments
67 --> $DIR/const-eval-select-bad.rs:33:32
69 LL | const fn foo(n: i32) -> i32 {
70 | --------------------------- found signature of `fn(i32) -> _`
72 LL | const_eval_select((true,), foo, baz);
73 | ----------------- ^^^ expected signature of `fn(bool) -> _`
75 | required by a bound introduced by this call
77 note: required by a bound in `const_eval_select`
78 --> $SRC_DIR/core/src/intrinsics.rs:LL:COL
80 LL | F: ~const FnOnce<ARG, Output = RET>,
81 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `const_eval_select`
83 error: aborting due to 5 previous errors
85 Some errors have detailed explanations: E0271, E0277, E0631.
86 For more information about an error, try `rustc --explain E0271`.