]> git.lizzy.rs Git - rust.git/blob - src/test/ui/suggestions/args-instead-of-tuple.stderr
Change inference var check to be in project_type
[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[E0061]: this function takes 1 argument but 2 arguments were supplied
35   --> $DIR/args-instead-of-tuple.rs:14:5
36    |
37 LL |     two_ints(1, 2);
38    |     ^^^^^^^^ -  - supplied 2 arguments
39    |
40 note: function defined here
41   --> $DIR/args-instead-of-tuple.rs:19:4
42    |
43 LL | fn two_ints(_: (i32, i32)) {
44    |    ^^^^^^^^ -------------
45 help: use parentheses to construct a tuple
46    |
47 LL |     two_ints((1, 2));
48    |              +    +
49
50 error[E0061]: this function takes 1 argument but 2 arguments were supplied
51   --> $DIR/args-instead-of-tuple.rs:16:5
52    |
53 LL |     with_generic(3, 4);
54    |     ^^^^^^^^^^^^ -  - supplied 2 arguments
55    |
56 note: function defined here
57   --> $DIR/args-instead-of-tuple.rs:22:4
58    |
59 LL | fn with_generic<T: Copy + Send>((a, b): (i32, T)) {
60    |    ^^^^^^^^^^^^                 ----------------
61 help: use parentheses to construct a tuple
62    |
63 LL |     with_generic((3, 4));
64    |                  +    +
65
66 error[E0061]: this function takes 1 argument but 2 arguments were supplied
67   --> $DIR/args-instead-of-tuple.rs:25:9
68    |
69 LL |         with_generic(a, b);
70    |         ^^^^^^^^^^^^ -  - supplied 2 arguments
71    |
72 note: function defined here
73   --> $DIR/args-instead-of-tuple.rs:22:4
74    |
75 LL | fn with_generic<T: Copy + Send>((a, b): (i32, T)) {
76    |    ^^^^^^^^^^^^                 ----------------
77 help: use parentheses to construct a tuple
78    |
79 LL |         with_generic((a, b));
80    |                      +    +
81
82 error: aborting due to 6 previous errors
83
84 For more information about this error, try `rustc --explain E0061`.