1- error[E0277]: expected a `FnOnce<((),) >` closure, found `[closure@$DIR/const-eval-select-bad.rs:6:27: 6:34 ]`
2- --> $DIR/const-eval-select-bad.rs:6:36
1+ error[E0277]: expected a `FnOnce<() >` closure, found `[closure@$DIR/const-eval-select-bad.rs:6:27: 6:32 ]`
2+ --> $DIR/const-eval-select-bad.rs:6:34
33 |
4- LL | const_eval_select((), |() | {}, |() | {});
5- | ----------------- ^^^^^^^ expected an `FnOnce<((),) >` closure, found `[closure@$DIR/const-eval-select-bad.rs:6:27: 6:34 ]`
4+ LL | const_eval_select((), || {}, || {});
5+ | ----------------- ^^^^^ expected an `FnOnce<() >` closure, found `[closure@$DIR/const-eval-select-bad.rs:6:27: 6:32 ]`
66 | |
77 | required by a bound introduced by this call
88 |
9- = help: the trait `FnOnce<((),)>` is not implemented for `[closure@$DIR/const-eval-select-bad.rs:6:27: 6:34]`
9+ = help: the trait `FnOnce<()>` is not implemented for `[closure@$DIR/const-eval-select-bad.rs:6:27: 6:32]`
10+ = note: wrap the `[closure@$DIR/const-eval-select-bad.rs:6:27: 6:32]` in a closure with no arguments: `|| { /* code */ }`
1011note: required by a bound in `const_eval_select`
1112 --> $SRC_DIR/core/src/intrinsics.rs:LL:COL
1213 |
13- LL | F: ~const FnOnce( ARG) -> RET,
14- | ^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `const_eval_select`
14+ LL | F: ~const FnOnce< ARG, Output = RET> ,
15+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `const_eval_select`
1516
16- error[E0277]: expected a `FnOnce<((), )>` closure, found `{integer}`
17+ error[E0277]: expected a `FnOnce<()>` closure, found `{integer}`
1718 --> $DIR/const-eval-select-bad.rs:8:31
1819 |
1920LL | const_eval_select((), 42, 0xDEADBEEF);
20- | ----------------- ^^^^^^^^^^ expected an `FnOnce<((), )>` closure, found `{integer}`
21+ | ----------------- ^^^^^^^^^^ expected an `FnOnce<()>` closure, found `{integer}`
2122 | |
2223 | required by a bound introduced by this call
2324 |
24- = help: the trait `FnOnce<((),)>` is not implemented for `{integer}`
25+ = help: the trait `FnOnce<()>` is not implemented for `{integer}`
26+ = note: wrap the `{integer}` in a closure with no arguments: `|| { /* code */ }`
2527note: required by a bound in `const_eval_select`
2628 --> $SRC_DIR/core/src/intrinsics.rs:LL:COL
2729 |
28- LL | F: ~const FnOnce( ARG) -> RET,
29- | ^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `const_eval_select`
30+ LL | F: ~const FnOnce< ARG, Output = RET> ,
31+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `const_eval_select`
3032
31- error[E0271]: type mismatch resolving `<fn(( i32,)) -> bool {bar} as FnOnce<(( i32,) ,)>>::Output == i32`
33+ error[E0271]: type mismatch resolving `<fn(i32) -> bool {bar} as FnOnce<(i32,)>>::Output == i32`
3234 --> $DIR/const-eval-select-bad.rs:27:5
3335 |
3436LL | const_eval_select((1,), foo, bar);
@@ -37,25 +39,25 @@ LL | const_eval_select((1,), foo, bar);
3739note: required by a bound in `const_eval_select`
3840 --> $SRC_DIR/core/src/intrinsics.rs:LL:COL
3941 |
40- LL | G: FnOnce( ARG) -> RET + ~const Drop,
41- | ^^^ required by this bound in `const_eval_select`
42+ LL | G: FnOnce< ARG, Output = RET> + ~const Drop,
43+ | ^^^^^^^^^ ^^^ required by this bound in `const_eval_select`
4244
4345error[E0631]: type mismatch in function arguments
4446 --> $DIR/const-eval-select-bad.rs:32:37
4547 |
46- LL | const fn foo((n,): ( i32,) ) -> i32 {
47- | --------------------------------- found signature of `fn(( i32,) ) -> _`
48+ LL | const fn foo(n: i32) -> i32 {
49+ | --------------------------- found signature of `fn(i32) -> _`
4850...
4951LL | const_eval_select((true,), foo, baz);
50- | ----------------- ^^^ expected signature of `fn(( bool,) ) -> _`
52+ | ----------------- ^^^ expected signature of `fn(bool) -> _`
5153 | |
5254 | required by a bound introduced by this call
5355 |
5456note: required by a bound in `const_eval_select`
5557 --> $SRC_DIR/core/src/intrinsics.rs:LL:COL
5658 |
57- LL | F: ~const FnOnce( ARG) -> RET,
58- | ^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `const_eval_select`
59+ LL | F: ~const FnOnce< ARG, Output = RET> ,
60+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `const_eval_select`
5961
6062error: aborting due to 4 previous errors
6163
0 commit comments