]> git.proxmox.com Git - rustc.git/blob - tests/ui/intrinsics/const-eval-select-bad.stderr
New upstream version 1.68.2+dfsg1
[rustc.git] / tests / ui / intrinsics / const-eval-select-bad.stderr
1 error: this argument must be a function item
2 --> $DIR/const-eval-select-bad.rs:7:27
3 |
4 LL | 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
10 error: this argument must be a function item
11 --> $DIR/const-eval-select-bad.rs:7:34
12 |
13 LL | 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
19 error: this argument must be a function item
20 --> $DIR/const-eval-select-bad.rs:10:27
21 |
22 LL | 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
28 error[E0277]: expected a `FnOnce<()>` closure, found `{integer}`
29 --> $DIR/const-eval-select-bad.rs:10:27
30 |
31 LL | 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 */ }`
38 note: required by a bound in `const_eval_select`
39 --> $SRC_DIR/core/src/intrinsics.rs:LL:COL
40
41 error: this argument must be a function item
42 --> $DIR/const-eval-select-bad.rs:10:31
43 |
44 LL | 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
50 error[E0277]: expected a `FnOnce<()>` closure, found `{integer}`
51 --> $DIR/const-eval-select-bad.rs:10:31
52 |
53 LL | 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 */ }`
60 note: required by a bound in `const_eval_select`
61 --> $SRC_DIR/core/src/intrinsics.rs:LL:COL
62
63 error[E0271]: expected `fn(i32) -> bool {bar}` to be a fn item that returns `i32`, but it returns `bool`
64 --> $DIR/const-eval-select-bad.rs:32:34
65 |
66 LL | const_eval_select((1,), foo, bar);
67 | ----------------- ^^^ expected `i32`, found `bool`
68 | |
69 | required by a bound introduced by this call
70 |
71 note: required by a bound in `const_eval_select`
72 --> $SRC_DIR/core/src/intrinsics.rs:LL:COL
73
74 error[E0631]: type mismatch in function arguments
75 --> $DIR/const-eval-select-bad.rs:37:32
76 |
77 LL | const fn foo(n: i32) -> i32 {
78 | --------------------------- found signature defined here
79 ...
80 LL | 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) -> _`
87 note: required by a bound in `const_eval_select`
88 --> $SRC_DIR/core/src/intrinsics.rs:LL:COL
89
90 error: this argument must be a `const fn`
91 --> $DIR/const-eval-select-bad.rs:42:29
92 |
93 LL | const_eval_select((1,), bar, bar);
94 | ^^^
95 |
96 = help: consult the documentation on `const_eval_select` for more information
97
98 error: aborting due to 9 previous errors
99
100 Some errors have detailed explanations: E0271, E0277, E0631.
101 For more information about an error, try `rustc --explain E0271`.