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 LL | F: FnOnce<ARG, Output = RET>;
42 | ^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `const_eval_select`
44 error: this argument must be a function item
45 --> $DIR/const-eval-select-bad.rs:10:31
47 LL | const_eval_select((), 42, 0xDEADBEEF);
50 = note: expected a function item, found {integer}
51 = help: consult the documentation on `const_eval_select` for more information
53 error[E0277]: expected a `FnOnce<()>` closure, found `{integer}`
54 --> $DIR/const-eval-select-bad.rs:10:31
56 LL | const_eval_select((), 42, 0xDEADBEEF);
57 | ----------------- ^^^^^^^^^^ expected an `FnOnce<()>` closure, found `{integer}`
59 | required by a bound introduced by this call
61 = help: the trait `FnOnce<()>` is not implemented for `{integer}`
62 = note: wrap the `{integer}` in a closure with no arguments: `|| { /* code */ }`
63 note: required by a bound in `const_eval_select`
64 --> $SRC_DIR/core/src/intrinsics.rs:LL:COL
66 LL | G: FnOnce<ARG, Output = RET>,
67 | ^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `const_eval_select`
69 error[E0271]: expected `fn(i32) -> bool {bar}` to be a fn item that returns `i32`, but it returns `bool`
70 --> $DIR/const-eval-select-bad.rs:32:34
72 LL | const_eval_select((1,), foo, bar);
73 | ----------------- ^^^ expected `i32`, found `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 | G: FnOnce<ARG, Output = RET>,
81 | ^^^^^^^^^^^^ required by this bound in `const_eval_select`
83 error[E0631]: type mismatch in function arguments
84 --> $DIR/const-eval-select-bad.rs:37:32
86 LL | const fn foo(n: i32) -> i32 {
87 | --------------------------- found signature defined here
89 LL | const_eval_select((true,), foo, baz);
90 | ----------------- ^^^ expected due to this
92 | required by a bound introduced by this call
94 = note: expected function signature `fn(bool) -> _`
95 found function signature `fn(i32) -> _`
96 note: required by a bound in `const_eval_select`
97 --> $SRC_DIR/core/src/intrinsics.rs:LL:COL
99 LL | F: FnOnce<ARG, Output = RET>;
100 | ^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `const_eval_select`
102 error: this argument must be a `const fn`
103 --> $DIR/const-eval-select-bad.rs:42:29
105 LL | const_eval_select((1,), bar, bar);
108 = help: consult the documentation on `const_eval_select` for more information
110 error: aborting due to 9 previous errors
112 Some errors have detailed explanations: E0271, E0277, E0631.
113 For more information about an error, try `rustc --explain E0271`.