]> git.lizzy.rs Git - rust.git/blob - src/test/ui/issues/issue-5100.stderr
Merge commit '1411a98352ba6bee8ba3b0131c9243e5db1e6a2e' into sync_cg_clif-2021-12-31
[rust.git] / src / test / ui / issues / issue-5100.stderr
1 error[E0308]: mismatched types
2   --> $DIR/issue-5100.rs:8:9
3    |
4 LL | enum A { B, C }
5    |          - unit variant defined here
6 ...
7 LL |     match (true, false) {
8    |           ------------- this expression has type `(bool, bool)`
9 LL |         A::B => (),
10    |         ^^^^ expected tuple, found enum `A`
11    |
12    = note: expected tuple `(bool, bool)`
13                found enum `A`
14
15 error[E0308]: mismatched types
16   --> $DIR/issue-5100.rs:17:9
17    |
18 LL |     match (true, false) {
19    |           ------------- this expression has type `(bool, bool)`
20 LL |         (true, false, false) => ()
21    |         ^^^^^^^^^^^^^^^^^^^^ expected a tuple with 2 elements, found one with 3 elements
22    |
23    = note: expected tuple `(bool, bool)`
24               found tuple `(_, _, _)`
25
26 error[E0308]: mismatched types
27   --> $DIR/issue-5100.rs:25:9
28    |
29 LL |     match (true, false) {
30    |           ------------- this expression has type `(bool, bool)`
31 LL |         (true, false, false) => ()
32    |         ^^^^^^^^^^^^^^^^^^^^ expected a tuple with 2 elements, found one with 3 elements
33    |
34    = note: expected tuple `(bool, bool)`
35               found tuple `(_, _, _)`
36
37 error[E0308]: mismatched types
38   --> $DIR/issue-5100.rs:33:9
39    |
40 LL |     match (true, false) {
41    |           ------------- this expression has type `(bool, bool)`
42 LL |         box (true, false) => ()
43    |         ^^^^^^^^^^^^^^^^^ expected tuple, found struct `Box`
44    |
45    = note: expected tuple `(bool, bool)`
46              found struct `Box<_>`
47
48 error[E0308]: mismatched types
49   --> $DIR/issue-5100.rs:40:9
50    |
51 LL |     match (true, false) {
52    |           ------------- this expression has type `(bool, bool)`
53 LL |         &(true, false) => ()
54    |         ^^^^^^^^^^^^^^ expected tuple, found reference
55    |
56    = note:  expected tuple `(bool, bool)`
57            found reference `&_`
58
59 error[E0618]: expected function, found `(char, char)`
60   --> $DIR/issue-5100.rs:48:14
61    |
62 LL |       let v = [('a', 'b')
63    |  ______________-^^^^^^^^^
64 LL | |              ('c', 'd'),
65    | |_______________________- call expression requires function
66
67 error[E0308]: mismatched types
68   --> $DIR/issue-5100.rs:55:19
69    |
70 LL |     let x: char = true;
71    |            ----   ^^^^ expected `char`, found `bool`
72    |            |
73    |            expected due to this
74
75 error: aborting due to 7 previous errors
76
77 Some errors have detailed explanations: E0308, E0618.
78 For more information about an error, try `rustc --explain E0308`.