1- error: this argument must be a function item
1+ error[E0277]: the trait bound `{closure@$DIR/const-eval-select-bad.rs:7:27: 7:29}: const FnOnce()` is not satisfied
22 --> $DIR/const-eval-select-bad.rs:7:27
33 |
44LL | const_eval_select((), || {}, || {});
5- | ^^^^^
6- |
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
9-
10- error: this argument must be a function item
11- --> $DIR/const-eval-select-bad.rs:7:34
12- |
13- LL | const_eval_select((), || {}, || {});
14- | ^^^^^
5+ | ----------------- ^^^^^
6+ | |
7+ | required by a bound introduced by this call
158 |
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
9+ note: required by a bound in `const_eval_select`
10+ --> $SRC_DIR/core/src/intrinsics/mod.rs:LL:COL
1811
1912error[E0277]: expected a `FnOnce()` closure, found `{integer}`
20- --> $DIR/const-eval-select-bad.rs:10 :27
13+ --> $DIR/const-eval-select-bad.rs:9 :27
2114 |
2215LL | const_eval_select((), 42, 0xDEADBEEF);
2316 | ----------------- ^^ expected an `FnOnce()` closure, found `{integer}`
@@ -30,7 +23,7 @@ note: required by a bound in `const_eval_select`
3023 --> $SRC_DIR/core/src/intrinsics/mod.rs:LL:COL
3124
3225error[E0277]: expected a `FnOnce()` closure, found `{integer}`
33- --> $DIR/const-eval-select-bad.rs:10 :31
26+ --> $DIR/const-eval-select-bad.rs:9 :31
3427 |
3528LL | const_eval_select((), 42, 0xDEADBEEF);
3629 | ----------------- ^^^^^^^^^^ expected an `FnOnce()` closure, found `{integer}`
@@ -42,26 +35,8 @@ LL | const_eval_select((), 42, 0xDEADBEEF);
4235note: required by a bound in `const_eval_select`
4336 --> $SRC_DIR/core/src/intrinsics/mod.rs:LL:COL
4437
45- error: this argument must be a function item
46- --> $DIR/const-eval-select-bad.rs:10:27
47- |
48- LL | const_eval_select((), 42, 0xDEADBEEF);
49- | ^^
50- |
51- = note: expected a function item, found {integer}
52- = help: consult the documentation on `const_eval_select` for more information
53-
54- error: this argument must be a function item
55- --> $DIR/const-eval-select-bad.rs:10:31
56- |
57- LL | const_eval_select((), 42, 0xDEADBEEF);
58- | ^^^^^^^^^^
59- |
60- = note: expected a function item, found {integer}
61- = help: consult the documentation on `const_eval_select` for more information
62-
6338error[E0271]: expected `bar` to return `i32`, but it returns `bool`
64- --> $DIR/const-eval-select-bad.rs:32 :34
39+ --> $DIR/const-eval-select-bad.rs:29 :34
6540 |
6641LL | const_eval_select((1,), foo, bar);
6742 | ----------------- ^^^ expected `i32`, found `bool`
@@ -72,7 +47,7 @@ note: required by a bound in `const_eval_select`
7247 --> $SRC_DIR/core/src/intrinsics/mod.rs:LL:COL
7348
7449error[E0631]: type mismatch in function arguments
75- --> $DIR/const-eval-select-bad.rs:37 :32
50+ --> $DIR/const-eval-select-bad.rs:34 :32
7651 |
7752LL | const fn foo(n: i32) -> i32 {
7853 | --------------------------- found signature defined here
@@ -91,15 +66,18 @@ help: consider wrapping the function in a closure
9166LL | const_eval_select((true,), |arg0: bool| foo(/* i32 */), baz);
9267 | ++++++++++++ +++++++++++
9368
94- error: this argument must be a ` const fn`
95- --> $DIR/const-eval-select-bad.rs:42 :29
69+ error[E0277]: the trait bound `fn(i32) -> bool {bar}: const FnOnce(i32)` is not satisfied
70+ --> $DIR/const-eval-select-bad.rs:39 :29
9671 |
9772LL | const_eval_select((1,), bar, bar);
98- | ^^^
73+ | ----------------- ^^^
74+ | |
75+ | required by a bound introduced by this call
9976 |
100- = help: consult the documentation on `const_eval_select` for more information
77+ note: required by a bound in `const_eval_select`
78+ --> $SRC_DIR/core/src/intrinsics/mod.rs:LL:COL
10179
102- error: aborting due to 9 previous errors
80+ error: aborting due to 6 previous errors
10381
10482Some errors have detailed explanations: E0271, E0277, E0631.
10583For more information about an error, try `rustc --explain E0271`.
0 commit comments