X-Git-Url: https://git.lizzy.rs/?a=blobdiff_plain;f=src%2Ftest%2Fui%2Fintrinsics%2Fconst-eval-select-bad.stderr;h=78647e92138c2ccaa8dd3cd29001265654afea8b;hb=6770dbd4b5729677bcca6a4c73d3335e523a7ac9;hp=a38eb627e341de280974e98b2fb998deec6281dc;hpb=5387b6542f1d72d332c84e8325309f0c9de7b6a0;p=rust.git diff --git a/src/test/ui/intrinsics/const-eval-select-bad.stderr b/src/test/ui/intrinsics/const-eval-select-bad.stderr index a38eb627e34..78647e92138 100644 --- a/src/test/ui/intrinsics/const-eval-select-bad.stderr +++ b/src/test/ui/intrinsics/const-eval-select-bad.stderr @@ -1,34 +1,36 @@ -error[E0277]: expected a `FnOnce<((),)>` closure, found `[closure@$DIR/const-eval-select-bad.rs:6:27: 6:34]` - --> $DIR/const-eval-select-bad.rs:6:36 +error[E0277]: expected a `FnOnce<()>` closure, found `[closure@$DIR/const-eval-select-bad.rs:6:27: 6:32]` + --> $DIR/const-eval-select-bad.rs:6:34 | -LL | const_eval_select((), |()| {}, |()| {}); - | ----------------- ^^^^^^^ expected an `FnOnce<((),)>` closure, found `[closure@$DIR/const-eval-select-bad.rs:6:27: 6:34]` +LL | const_eval_select((), || {}, || {}); + | ----------------- ^^^^^ expected an `FnOnce<()>` closure, found `[closure@$DIR/const-eval-select-bad.rs:6:27: 6:32]` | | | required by a bound introduced by this call | - = help: the trait `FnOnce<((),)>` is not implemented for `[closure@$DIR/const-eval-select-bad.rs:6:27: 6:34]` + = help: the trait `FnOnce<()>` is not implemented for `[closure@$DIR/const-eval-select-bad.rs:6:27: 6:32]` + = note: wrap the `[closure@$DIR/const-eval-select-bad.rs:6:27: 6:32]` in a closure with no arguments: `|| { /* code */ }` note: required by a bound in `const_eval_select` --> $SRC_DIR/core/src/intrinsics.rs:LL:COL | -LL | F: ~const FnOnce(ARG) -> RET, - | ^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `const_eval_select` +LL | F: ~const FnOnce, + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `const_eval_select` -error[E0277]: expected a `FnOnce<((),)>` closure, found `{integer}` +error[E0277]: expected a `FnOnce<()>` closure, found `{integer}` --> $DIR/const-eval-select-bad.rs:8:31 | LL | const_eval_select((), 42, 0xDEADBEEF); - | ----------------- ^^^^^^^^^^ expected an `FnOnce<((),)>` closure, found `{integer}` + | ----------------- ^^^^^^^^^^ expected an `FnOnce<()>` closure, found `{integer}` | | | required by a bound introduced by this call | - = help: the trait `FnOnce<((),)>` is not implemented for `{integer}` + = 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 | -LL | F: ~const FnOnce(ARG) -> RET, - | ^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `const_eval_select` +LL | F: ~const FnOnce, + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `const_eval_select` -error[E0271]: type mismatch resolving ` bool {bar} as FnOnce<((i32,),)>>::Output == i32` +error[E0271]: type mismatch resolving ` bool {bar} as FnOnce<(i32,)>>::Output == i32` --> $DIR/const-eval-select-bad.rs:27:5 | LL | const_eval_select((1,), foo, bar); @@ -37,25 +39,25 @@ LL | const_eval_select((1,), foo, bar); note: required by a bound in `const_eval_select` --> $SRC_DIR/core/src/intrinsics.rs:LL:COL | -LL | G: FnOnce(ARG) -> RET + ~const Drop, - | ^^^ required by this bound in `const_eval_select` +LL | G: FnOnce + ~const Drop, + | ^^^^^^^^^^^^ required by this bound in `const_eval_select` error[E0631]: type mismatch in function arguments --> $DIR/const-eval-select-bad.rs:32:37 | -LL | const fn foo((n,): (i32,)) -> i32 { - | --------------------------------- found signature of `fn((i32,)) -> _` +LL | const fn foo(n: i32) -> i32 { + | --------------------------- found signature of `fn(i32) -> _` ... LL | const_eval_select((true,), foo, baz); - | ----------------- ^^^ expected signature of `fn((bool,)) -> _` + | ----------------- ^^^ expected signature of `fn(bool) -> _` | | | 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 | -LL | F: ~const FnOnce(ARG) -> RET, - | ^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `const_eval_select` +LL | F: ~const FnOnce, + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `const_eval_select` error: aborting due to 4 previous errors