@@ -31,14 +31,40 @@ help: expected the unit value `()`; create it with empty parentheses
31
31
LL | let _: Option<()> = Some(());
32
32
| ++
33
33
34
+ error[E0308]: mismatched types
35
+ --> $DIR/args-instead-of-tuple.rs:14:34
36
+ |
37
+ LL | let _: Option<(i32,)> = Some(3);
38
+ | ^ expected tuple, found integer
39
+ |
40
+ = note: expected tuple `(i32,)`
41
+ found type `{integer}`
42
+ help: use a trailing comma to create a tuple with one element
43
+ |
44
+ LL | let _: Option<(i32,)> = Some((3,));
45
+ | + ++
46
+
47
+ error[E0308]: mismatched types
48
+ --> $DIR/args-instead-of-tuple.rs:17:34
49
+ |
50
+ LL | let _: Option<(i32,)> = Some((3));
51
+ | ^^^ expected tuple, found integer
52
+ |
53
+ = note: expected tuple `(i32,)`
54
+ found type `{integer}`
55
+ help: use a trailing comma to create a tuple with one element
56
+ |
57
+ LL | let _: Option<(i32,)> = Some((3,));
58
+ | +
59
+
34
60
error[E0061]: this function takes 1 argument but 2 arguments were supplied
35
- --> $DIR/args-instead-of-tuple.rs:14 :5
61
+ --> $DIR/args-instead-of-tuple.rs:20 :5
36
62
|
37
63
LL | two_ints(1, 2);
38
64
| ^^^^^^^^ - - supplied 2 arguments
39
65
|
40
66
note: function defined here
41
- --> $DIR/args-instead-of-tuple.rs:19 :4
67
+ --> $DIR/args-instead-of-tuple.rs:25 :4
42
68
|
43
69
LL | fn two_ints(_: (i32, i32)) {
44
70
| ^^^^^^^^ -------------
@@ -48,13 +74,13 @@ LL | two_ints((1, 2));
48
74
| + +
49
75
50
76
error[E0061]: this function takes 1 argument but 2 arguments were supplied
51
- --> $DIR/args-instead-of-tuple.rs:16 :5
77
+ --> $DIR/args-instead-of-tuple.rs:22 :5
52
78
|
53
79
LL | with_generic(3, 4);
54
80
| ^^^^^^^^^^^^ - - supplied 2 arguments
55
81
|
56
82
note: function defined here
57
- --> $DIR/args-instead-of-tuple.rs:22 :4
83
+ --> $DIR/args-instead-of-tuple.rs:28 :4
58
84
|
59
85
LL | fn with_generic<T: Copy + Send>((a, b): (i32, T)) {
60
86
| ^^^^^^^^^^^^ ----------------
@@ -64,13 +90,13 @@ LL | with_generic((3, 4));
64
90
| + +
65
91
66
92
error[E0061]: this function takes 1 argument but 2 arguments were supplied
67
- --> $DIR/args-instead-of-tuple.rs:25 :9
93
+ --> $DIR/args-instead-of-tuple.rs:31 :9
68
94
|
69
95
LL | with_generic(a, b);
70
96
| ^^^^^^^^^^^^ - - supplied 2 arguments
71
97
|
72
98
note: function defined here
73
- --> $DIR/args-instead-of-tuple.rs:22 :4
99
+ --> $DIR/args-instead-of-tuple.rs:28 :4
74
100
|
75
101
LL | fn with_generic<T: Copy + Send>((a, b): (i32, T)) {
76
102
| ^^^^^^^^^^^^ ----------------
@@ -79,6 +105,7 @@ help: use parentheses to construct a tuple
79
105
LL | with_generic((a, b));
80
106
| + +
81
107
82
- error: aborting due to 6 previous errors
108
+ error: aborting due to 8 previous errors
83
109
84
- For more information about this error, try `rustc --explain E0061`.
110
+ Some errors have detailed explanations: E0061, E0308.
111
+ For more information about an error, try `rustc --explain E0061`.
0 commit comments