summaryrefslogtreecommitdiffstats
path: root/tests/ui/issues/issue-5100.stderr
blob: b1680aacd16563f3d443980af9a7a4f115481168 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
error[E0308]: mismatched types
  --> $DIR/issue-5100.rs:8:9
   |
LL | enum A { B, C }
   |          - unit variant defined here
...
LL |     match (true, false) {
   |           ------------- this expression has type `(bool, bool)`
LL |         A::B => (),
   |         ^^^^ expected `(bool, bool)`, found `A`
   |
   = note: expected tuple `(bool, bool)`
               found enum `A`

error[E0308]: mismatched types
  --> $DIR/issue-5100.rs:17:9
   |
LL |     match (true, false) {
   |           ------------- this expression has type `(bool, bool)`
LL |         (true, false, false) => ()
   |         ^^^^^^^^^^^^^^^^^^^^ expected a tuple with 2 elements, found one with 3 elements
   |
   = note: expected tuple `(bool, bool)`
              found tuple `(_, _, _)`

error[E0308]: mismatched types
  --> $DIR/issue-5100.rs:25:9
   |
LL |     match (true, false) {
   |           ------------- this expression has type `(bool, bool)`
LL |         (true, false, false) => ()
   |         ^^^^^^^^^^^^^^^^^^^^ expected a tuple with 2 elements, found one with 3 elements
   |
   = note: expected tuple `(bool, bool)`
              found tuple `(_, _, _)`

error[E0308]: mismatched types
  --> $DIR/issue-5100.rs:33:9
   |
LL |     match (true, false) {
   |           ------------- this expression has type `(bool, bool)`
LL |         box (true, false) => ()
   |         ^^^^^^^^^^^^^^^^^ expected `(bool, bool)`, found `Box<_>`
   |
   = note: expected tuple `(bool, bool)`
             found struct `Box<_>`

error[E0308]: mismatched types
  --> $DIR/issue-5100.rs:40:9
   |
LL |     match (true, false) {
   |           ------------- this expression has type `(bool, bool)`
LL |         &(true, false) => ()
   |         ^^^^^^^^^^^^^^ expected `(bool, bool)`, found `&_`
   |
   = note:  expected tuple `(bool, bool)`
           found reference `&_`

error[E0618]: expected function, found `(char, char)`
  --> $DIR/issue-5100.rs:48:14
   |
LL |     let v = [('a', 'b')
   |              ^^^^^^^^^^- help: consider separating array elements with a comma: `,`

error[E0308]: mismatched types
  --> $DIR/issue-5100.rs:55:19
   |
LL |     let x: char = true;
   |            ----   ^^^^ expected `char`, found `bool`
   |            |
   |            expected due to this

error: aborting due to 7 previous errors

Some errors have detailed explanations: E0308, E0618.
For more information about an error, try `rustc --explain E0308`.