1 error: this argument must be a function item
2 --> $DIR/const-eval-select-bad.rs:7:27
4 LL | const_eval_select((), || {}, || {});
7 = note: expected a function item, found [closure@$DIR/const-eval-select-bad.rs:7:27: 7:29]
8 = help: consult the documentation on `const_eval_select` for more information
10 error: this argument must be a function item
11 --> $DIR/const-eval-select-bad.rs:7:34
13 LL | const_eval_select((), || {}, || {});
16 = note: expected a function item, found [closure@$DIR/const-eval-select-bad.rs:7:34: 7:36]
17 = help: consult the documentation on `const_eval_select` for more information
19 error: this argument must be a function item
20 --> $DIR/const-eval-select-bad.rs:10:27
22 LL | const_eval_select((), 42, 0xDEADBEEF);
25 = note: expected a function item, found {integer}
26 = help: consult the documentation on `const_eval_select` for more information
28 error[E0277]: expected a `FnOnce<()>` closure, found `{integer}`
29 --> $DIR/const-eval-select-bad.rs:10:27
31 LL | const_eval_select((), 42, 0xDEADBEEF);
32 | ----------------- ^^ expected an `FnOnce<()>` closure, found `{integer}`
34 | required by a bound introduced by this call
36 = help: the trait `FnOnce<()>` is not implemented for `{integer}`
37 = note: wrap the `{integer}` in a closure with no arguments: `|| { /* code */ }`
38 note: required by a bound in `const_eval_select`
39 --> $SRC_DIR/core/src/intrinsics.rs:LL:COL
41 error: this argument must be a function item
42 --> $DIR/const-eval-select-bad.rs:10:31
44 LL | const_eval_select((), 42, 0xDEADBEEF);
47 = note: expected a function item, found {integer}
48 = help: consult the documentation on `const_eval_select` for more information
50 error[E0277]: expected a `FnOnce<()>` closure, found `{integer}`
51 --> $DIR/const-eval-select-bad.rs:10:31
53 LL | const_eval_select((), 42, 0xDEADBEEF);
54 | ----------------- ^^^^^^^^^^ expected an `FnOnce<()>` closure, found `{integer}`
56 | required by a bound introduced by this call
58 = help: the trait `FnOnce<()>` is not implemented for `{integer}`
59 = note: wrap the `{integer}` in a closure with no arguments: `|| { /* code */ }`
60 note: required by a bound in `const_eval_select`
61 --> $SRC_DIR/core/src/intrinsics.rs:LL:COL
63 error[E0271]: expected `fn(i32) -> bool {bar}` to be a fn item that returns `i32`, but it returns `bool`
64 --> $DIR/const-eval-select-bad.rs:32:34
66 LL | const_eval_select((1,), foo, bar);
67 | ----------------- ^^^ expected `i32`, found `bool`
69 | required by a bound introduced by this call
71 note: required by a bound in `const_eval_select`
72 --> $SRC_DIR/core/src/intrinsics.rs:LL:COL
74 error[E0631]: type mismatch in function arguments
75 --> $DIR/const-eval-select-bad.rs:37:32
77 LL | const fn foo(n: i32) -> i32 {
78 | --------------------------- found signature defined here
80 LL | const_eval_select((true,), foo, baz);
81 | ----------------- ^^^ expected due to this
83 | required by a bound introduced by this call
85 = note: expected function signature `fn(bool) -> _`
86 found function signature `fn(i32) -> _`
87 note: required by a bound in `const_eval_select`
88 --> $SRC_DIR/core/src/intrinsics.rs:LL:COL
90 error: this argument must be a `const fn`
91 --> $DIR/const-eval-select-bad.rs:42:29
93 LL | const_eval_select((1,), bar, bar);
96 = help: consult the documentation on `const_eval_select` for more information
98 error: aborting due to 9 previous errors
100 Some errors have detailed explanations: E0271, E0277, E0631.
101 For more information about an error, try `rustc --explain E0271`.