1
+ <<<<<<< HEAD
1
2
error[E0277]: the trait bound `[closure@$DIR/const-eval-select-bad.rs:6:27: 6:29]: ~const FnOnce<()>` is not satisfied
2
3
--> $DIR/const-eval-select-bad.rs:6:27
3
4
|
@@ -13,14 +14,31 @@ note: the trait `FnOnce<()>` is implemented for `[closure@$DIR/const-eval-select
13
14
LL | const_eval_select((), || {}, || {});
14
15
| ^^^^^
15
16
= note: wrap the `[closure@$DIR/const-eval-select-bad.rs:6:27: 6:29]` in a closure with no arguments: `|| { /* code */ }`
17
+ =======
18
+ error[E0277]: the trait bound `[closure@$DIR/const-eval-select-bad.rs:7:27: 7:32]: ~const FnOnce<()>` is not satisfied
19
+ --> $DIR/const-eval-select-bad.rs:7:27
20
+ |
21
+ LL | const_eval_select((), || {}, || {});
22
+ | ----------------- ^^^^^ expected an `FnOnce<()>` closure, found `[closure@$DIR/const-eval-select-bad.rs:7:27: 7:32]`
23
+ | |
24
+ | required by a bound introduced by this call
25
+ |
26
+ = help: the trait `~const FnOnce<()>` is not implemented for `[closure@$DIR/const-eval-select-bad.rs:7:27: 7:32]`
27
+ note: the trait `FnOnce<()>` is implemented for `[closure@$DIR/const-eval-select-bad.rs:7:27: 7:32]`, but that implementation is not `const`
28
+ --> $DIR/const-eval-select-bad.rs:7:27
29
+ |
30
+ LL | const_eval_select((), || {}, || {});
31
+ | ^^^^^
32
+ = note: wrap the `[closure@$DIR/const-eval-select-bad.rs:7:27: 7:32]` in a closure with no arguments: `|| { /* code */ }`
33
+ >>>>>>> c1798b7c60e... Support unstable moves via stable in unstable items
16
34
note: required by a bound in `const_eval_select`
17
35
--> $SRC_DIR/core/src/intrinsics.rs:LL:COL
18
36
|
19
37
LL | F: ~const FnOnce<ARG, Output = RET>,
20
38
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `const_eval_select`
21
39
22
40
error[E0277]: the trait bound `{integer}: ~const FnOnce<()>` is not satisfied
23
- --> $DIR/const-eval-select-bad.rs:8 :27
41
+ --> $DIR/const-eval-select-bad.rs:9 :27
24
42
|
25
43
LL | const_eval_select((), 42, 0xDEADBEEF);
26
44
| ----------------- ^^ expected an `FnOnce<()>` closure, found `{integer}`
@@ -36,7 +54,7 @@ LL | F: ~const FnOnce<ARG, Output = RET>,
36
54
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `const_eval_select`
37
55
38
56
error[E0277]: expected a `FnOnce<()>` closure, found `{integer}`
39
- --> $DIR/const-eval-select-bad.rs:8 :31
57
+ --> $DIR/const-eval-select-bad.rs:9 :31
40
58
|
41
59
LL | const_eval_select((), 42, 0xDEADBEEF);
42
60
| ----------------- ^^^^^^^^^^ expected an `FnOnce<()>` closure, found `{integer}`
@@ -52,7 +70,7 @@ LL | G: FnOnce<ARG, Output = RET> + ~const Destruct,
52
70
| ^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `const_eval_select`
53
71
54
72
error[E0271]: type mismatch resolving `<fn(i32) -> bool {bar} as FnOnce<(i32,)>>::Output == i32`
55
- --> $DIR/const-eval-select-bad.rs:28 :5
73
+ --> $DIR/const-eval-select-bad.rs:29 :5
56
74
|
57
75
LL | const_eval_select((1,), foo, bar);
58
76
| ^^^^^^^^^^^^^^^^^ expected `i32`, found `bool`
@@ -64,7 +82,7 @@ LL | G: FnOnce<ARG, Output = RET> + ~const Destruct,
64
82
| ^^^^^^^^^^^^ required by this bound in `const_eval_select`
65
83
66
84
error[E0631]: type mismatch in function arguments
67
- --> $DIR/const-eval-select-bad.rs:33 :32
85
+ --> $DIR/const-eval-select-bad.rs:34 :32
68
86
|
69
87
LL | const fn foo(n: i32) -> i32 {
70
88
| --------------------------- found signature of `fn(i32) -> _`
0 commit comments