fork/rust

git clone https://git.julia.blue/fork/rust

borsAuto merge of #71868 - Mark-Simulacrum:stable-1.43.1, r=pietroalbini8d69840ab92

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