fork/rust
git clone https://git.julia.blue/fork/rust
3bcad65fbf6
master
1error: this argument must be a function item 2 --> $DIR/const-eval-select-bad.rs:7:27 3 | 4LL | 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 10error: this argument must be a function item 11 --> $DIR/const-eval-select-bad.rs:7:34 12 | 13LL | const_eval_select((), || {}, || {}); 14 | ^^^^^ 15 | 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 18 19error: this argument must be a function item 20 --> $DIR/const-eval-select-bad.rs:10:27 21 | 22LL | const_eval_select((), 42, 0xDEADBEEF); 23 | ^^ 24 | 25 = note: expected a function item, found {integer} 26 = help: consult the documentation on `const_eval_select` for more information 27 28error[E0277]: expected a `FnOnce<()>` closure, found `{integer}` 29 --> $DIR/const-eval-select-bad.rs:10:27 30 | 31LL | const_eval_select((), 42, 0xDEADBEEF); 32 | ----------------- ^^ expected an `FnOnce<()>` closure, found `{integer}` 33 | | 34 | required by a bound introduced by this call 35 | 36 = help: the trait `FnOnce<()>` is not implemented for `{integer}` 37 = note: wrap the `{integer}` in a closure with no arguments: `|| { /* code */ }` 38note: required by a bound in `const_eval_select` 39 --> $SRC_DIR/core/src/intrinsics.rs:LL:COL 40 41error: this argument must be a function item 42 --> $DIR/const-eval-select-bad.rs:10:31 43 | 44LL | const_eval_select((), 42, 0xDEADBEEF); 45 | ^^^^^^^^^^ 46 | 47 = note: expected a function item, found {integer} 48 = help: consult the documentation on `const_eval_select` for more information 49 50error[E0277]: expected a `FnOnce<()>` closure, found `{integer}` 51 --> $DIR/const-eval-select-bad.rs:10:31 52 | 53LL | const_eval_select((), 42, 0xDEADBEEF); 54 | ----------------- ^^^^^^^^^^ expected an `FnOnce<()>` closure, found `{integer}` 55 | | 56 | required by a bound introduced by this call 57 | 58 = help: the trait `FnOnce<()>` is not implemented for `{integer}` 59 = note: wrap the `{integer}` in a closure with no arguments: `|| { /* code */ }` 60note: required by a bound in `const_eval_select` 61 --> $SRC_DIR/core/src/intrinsics.rs:LL:COL 62 63error[E0271]: expected `bar` to be a fn item that returns `i32`, but it returns `bool` 64 --> $DIR/const-eval-select-bad.rs:32:34 65 | 66LL | const_eval_select((1,), foo, bar); 67 | ----------------- ^^^ expected `i32`, found `bool` 68 | | 69 | required by a bound introduced by this call 70 | 71note: required by a bound in `const_eval_select` 72 --> $SRC_DIR/core/src/intrinsics.rs:LL:COL 73 74error[E0631]: type mismatch in function arguments 75 --> $DIR/const-eval-select-bad.rs:37:32 76 | 77LL | const fn foo(n: i32) -> i32 { 78 | --------------------------- found signature defined here 79... 80LL | const_eval_select((true,), foo, baz); 81 | ----------------- ^^^ expected due to this 82 | | 83 | required by a bound introduced by this call 84 | 85 = note: expected function signature `fn(bool) -> _` 86 found function signature `fn(i32) -> _` 87note: required by a bound in `const_eval_select` 88 --> $SRC_DIR/core/src/intrinsics.rs:LL:COL 89 90error: this argument must be a `const fn` 91 --> $DIR/const-eval-select-bad.rs:42:29 92 | 93LL | const_eval_select((1,), bar, bar); 94 | ^^^ 95 | 96 = help: consult the documentation on `const_eval_select` for more information 97 98error: aborting due to 9 previous errors 99 100Some errors have detailed explanations: E0271, E0277, E0631. 101For more information about an error, try `rustc --explain E0271`.