]> git.lizzy.rs Git - rust.git/blob - src/test/ui/suggestions/args-instead-of-tuple.stderr
Rollup merge of #93613 - crlf0710:rename_to_async_iter, r=yaahc
[rust.git] / src / test / ui / suggestions / args-instead-of-tuple.stderr
1 error[E0061]: this enum variant takes 1 argument but 2 arguments were supplied
2   --> $DIR/args-instead-of-tuple.rs:7:36
3    |
4 LL |     let _: Result<(i32, i8), ()> = Ok(1, 2);
5    |                                    ^^ -  - supplied 2 arguments
6    |
7 help: use parentheses to construct a tuple
8    |
9 LL |     let _: Result<(i32, i8), ()> = Ok((1, 2));
10    |                                       +    +
11
12 error[E0061]: this enum variant takes 1 argument but 3 arguments were supplied
13   --> $DIR/args-instead-of-tuple.rs:9:46
14    |
15 LL |     let _: Option<(i32, i8, &'static str)> = Some(1, 2, "hi");
16    |                                              ^^^^ -  -  ---- supplied 3 arguments
17    |
18 help: use parentheses to construct a tuple
19    |
20 LL |     let _: Option<(i32, i8, &'static str)> = Some((1, 2, "hi"));
21    |                                                   +          +
22
23 error[E0061]: this enum variant takes 1 argument but 0 arguments were supplied
24   --> $DIR/args-instead-of-tuple.rs:11:25
25    |
26 LL |     let _: Option<()> = Some();
27    |                         ^^^^-- supplied 0 arguments
28    |
29 help: expected the unit value `()`; create it with empty parentheses
30    |
31 LL |     let _: Option<()> = Some(());
32    |                              ++
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
60 error[E0061]: this function takes 1 argument but 2 arguments were supplied
61   --> $DIR/args-instead-of-tuple.rs:20:5
62    |
63 LL |     two_ints(1, 2);
64    |     ^^^^^^^^ -  - supplied 2 arguments
65    |
66 note: function defined here
67   --> $DIR/args-instead-of-tuple.rs:25:4
68    |
69 LL | fn two_ints(_: (i32, i32)) {
70    |    ^^^^^^^^ -------------
71 help: use parentheses to construct a tuple
72    |
73 LL |     two_ints((1, 2));
74    |              +    +
75
76 error[E0061]: this function takes 1 argument but 2 arguments were supplied
77   --> $DIR/args-instead-of-tuple.rs:22:5
78    |
79 LL |     with_generic(3, 4);
80    |     ^^^^^^^^^^^^ -  - supplied 2 arguments
81    |
82 note: function defined here
83   --> $DIR/args-instead-of-tuple.rs:28:4
84    |
85 LL | fn with_generic<T: Copy + Send>((a, b): (i32, T)) {
86    |    ^^^^^^^^^^^^                 ----------------
87 help: use parentheses to construct a tuple
88    |
89 LL |     with_generic((3, 4));
90    |                  +    +
91
92 error[E0061]: this function takes 1 argument but 2 arguments were supplied
93   --> $DIR/args-instead-of-tuple.rs:31:9
94    |
95 LL |         with_generic(a, b);
96    |         ^^^^^^^^^^^^ -  - supplied 2 arguments
97    |
98 note: function defined here
99   --> $DIR/args-instead-of-tuple.rs:28:4
100    |
101 LL | fn with_generic<T: Copy + Send>((a, b): (i32, T)) {
102    |    ^^^^^^^^^^^^                 ----------------
103 help: use parentheses to construct a tuple
104    |
105 LL |         with_generic((a, b));
106    |                      +    +
107
108 error: aborting due to 8 previous errors
109
110 Some errors have detailed explanations: E0061, E0308.
111 For more information about an error, try `rustc --explain E0061`.