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