os-rust/src/test/ui/intrinsics/const-eval-select-bad.stderr

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

105 lines
4.8 KiB
Text
Raw Normal View History

<<<<<<< HEAD
2022-06-27 07:45:35 +02:00
error[E0277]: the trait bound `[closure@$DIR/const-eval-select-bad.rs:6:27: 6:29]: ~const FnOnce<()>` is not satisfied
--> $DIR/const-eval-select-bad.rs:6:27
2021-10-12 05:06:37 +00:00
|
2021-10-14 06:18:53 +00:00
LL | const_eval_select((), || {}, || {});
2022-06-27 07:45:35 +02:00
| ----------------- ^^^^^ expected an `FnOnce<()>` closure, found `[closure@$DIR/const-eval-select-bad.rs:6:27: 6:29]`
2021-10-12 05:06:37 +00:00
| |
| required by a bound introduced by this call
|
2022-06-27 07:45:35 +02:00
= help: the trait `~const FnOnce<()>` is not implemented for `[closure@$DIR/const-eval-select-bad.rs:6:27: 6:29]`
note: the trait `FnOnce<()>` is implemented for `[closure@$DIR/const-eval-select-bad.rs:6:27: 6:29]`, but that implementation is not `const`
--> $DIR/const-eval-select-bad.rs:6:27
|
LL | const_eval_select((), || {}, || {});
| ^^^^^
2022-06-27 07:45:35 +02:00
= note: wrap the `[closure@$DIR/const-eval-select-bad.rs:6:27: 6:29]` in a closure with no arguments: `|| { /* code */ }`
=======
error[E0277]: the trait bound `[closure@$DIR/const-eval-select-bad.rs:7:27: 7:32]: ~const FnOnce<()>` is not satisfied
--> $DIR/const-eval-select-bad.rs:7:27
|
LL | const_eval_select((), || {}, || {});
| ----------------- ^^^^^ expected an `FnOnce<()>` closure, found `[closure@$DIR/const-eval-select-bad.rs:7:27: 7:32]`
| |
| required by a bound introduced by this call
|
= help: the trait `~const FnOnce<()>` is not implemented for `[closure@$DIR/const-eval-select-bad.rs:7:27: 7:32]`
note: the trait `FnOnce<()>` is implemented for `[closure@$DIR/const-eval-select-bad.rs:7:27: 7:32]`, but that implementation is not `const`
--> $DIR/const-eval-select-bad.rs:7:27
|
LL | const_eval_select((), || {}, || {});
| ^^^^^
= note: wrap the `[closure@$DIR/const-eval-select-bad.rs:7:27: 7:32]` in a closure with no arguments: `|| { /* code */ }`
>>>>>>> c1798b7c60e... Support unstable moves via stable in unstable items
2021-10-12 05:06:37 +00:00
note: required by a bound in `const_eval_select`
--> $SRC_DIR/core/src/intrinsics.rs:LL:COL
|
2021-10-14 06:18:53 +00:00
LL | F: ~const FnOnce<ARG, Output = RET>,
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `const_eval_select`
2021-10-12 05:06:37 +00:00
error[E0277]: the trait bound `{integer}: ~const FnOnce<()>` is not satisfied
--> $DIR/const-eval-select-bad.rs:9:27
2021-10-12 05:06:37 +00:00
|
LL | const_eval_select((), 42, 0xDEADBEEF);
| ----------------- ^^ expected an `FnOnce<()>` closure, found `{integer}`
2021-10-12 05:06:37 +00:00
| |
| required by a bound introduced by this call
|
= help: the trait `~const FnOnce<()>` is not implemented for `{integer}`
2021-10-14 06:18:53 +00:00
= note: wrap the `{integer}` in a closure with no arguments: `|| { /* code */ }`
2021-10-12 05:06:37 +00:00
note: required by a bound in `const_eval_select`
--> $SRC_DIR/core/src/intrinsics.rs:LL:COL
|
2021-10-14 06:18:53 +00:00
LL | F: ~const FnOnce<ARG, Output = RET>,
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `const_eval_select`
2021-10-12 05:06:37 +00:00
error[E0277]: expected a `FnOnce<()>` closure, found `{integer}`
--> $DIR/const-eval-select-bad.rs:9:31
|
LL | const_eval_select((), 42, 0xDEADBEEF);
| ----------------- ^^^^^^^^^^ expected an `FnOnce<()>` closure, found `{integer}`
| |
| required by a bound introduced by this call
|
= help: the trait `FnOnce<()>` is not implemented for `{integer}`
= note: wrap the `{integer}` in a closure with no arguments: `|| { /* code */ }`
note: required by a bound in `const_eval_select`
--> $SRC_DIR/core/src/intrinsics.rs:LL:COL
|
2022-04-06 09:29:58 +02:00
LL | G: FnOnce<ARG, Output = RET> + ~const Destruct,
| ^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `const_eval_select`
2021-10-14 06:18:53 +00:00
error[E0271]: type mismatch resolving `<fn(i32) -> bool {bar} as FnOnce<(i32,)>>::Output == i32`
--> $DIR/const-eval-select-bad.rs:29:5
2021-10-12 05:06:37 +00:00
|
LL | const_eval_select((1,), foo, bar);
| ^^^^^^^^^^^^^^^^^ expected `i32`, found `bool`
|
note: required by a bound in `const_eval_select`
--> $SRC_DIR/core/src/intrinsics.rs:LL:COL
|
2022-04-06 09:29:58 +02:00
LL | G: FnOnce<ARG, Output = RET> + ~const Destruct,
2021-10-14 06:18:53 +00:00
| ^^^^^^^^^^^^ required by this bound in `const_eval_select`
2021-10-12 05:06:37 +00:00
error[E0631]: type mismatch in function arguments
--> $DIR/const-eval-select-bad.rs:34:32
2021-10-12 05:06:37 +00:00
|
2021-10-14 06:18:53 +00:00
LL | const fn foo(n: i32) -> i32 {
| --------------------------- found signature of `fn(i32) -> _`
2021-10-12 05:06:37 +00:00
...
LL | const_eval_select((true,), foo, baz);
| ----------------- ^^^ expected signature of `fn(bool) -> _`
2021-10-12 05:06:37 +00:00
| |
| required by a bound introduced by this call
|
note: required by a bound in `const_eval_select`
--> $SRC_DIR/core/src/intrinsics.rs:LL:COL
|
2021-10-14 06:18:53 +00:00
LL | F: ~const FnOnce<ARG, Output = RET>,
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `const_eval_select`
2021-10-12 05:06:37 +00:00
error: aborting due to 5 previous errors
2021-10-12 05:06:37 +00:00
Some errors have detailed explanations: E0271, E0277, E0631.
For more information about an error, try `rustc --explain E0271`.