]> git.lizzy.rs Git - rust.git/blob - src/test/ui/suggestions/args-instead-of-tuple-errors.stderr
Merge commit 'e8dca3e87d164d2806098c462c6ce41301341f68' into sync_from_cg_gcc
[rust.git] / src / test / ui / suggestions / args-instead-of-tuple-errors.stderr
1 error[E0061]: this enum variant takes 1 argument but 2 arguments were supplied
2   --> $DIR/args-instead-of-tuple-errors.rs:6:34
3    |
4 LL |     let _: Option<(i32, bool)> = Some(1, 2);
5    |                                  ^^^^ -  - argument unexpected
6    |                                       |
7    |                                       expected tuple, found integer
8    |
9    = note: expected tuple `(i32, bool)`
10                found type `{integer}`
11 help: remove the extra argument
12    |
13 LL |     let _: Option<(i32, bool)> = Some({(i32, bool)});
14    |                                  ~~~~~~~~~~~~~~~~~~~
15
16 error[E0061]: this function takes 1 argument but 2 arguments were supplied
17   --> $DIR/args-instead-of-tuple-errors.rs:8:5
18    |
19 LL |     int_bool(1, 2);
20    |     ^^^^^^^^ -  - argument unexpected
21    |              |
22    |              expected tuple, found integer
23    |
24    = note: expected tuple `(i32, bool)`
25                found type `{integer}`
26 note: function defined here
27   --> $DIR/args-instead-of-tuple-errors.rs:21:4
28    |
29 LL | fn int_bool(_: (i32, bool)) {
30    |    ^^^^^^^^ --------------
31 help: remove the extra argument
32    |
33 LL |     int_bool({(i32, bool)});
34    |     ~~~~~~~~~~~~~~~~~~~~~~~
35
36 error[E0061]: this enum variant takes 1 argument but 0 arguments were supplied
37   --> $DIR/args-instead-of-tuple-errors.rs:11:28
38    |
39 LL |     let _: Option<(i8,)> = Some();
40    |                            ^^^^-- an argument of type `(i8,)` is missing
41    |
42 help: provide the argument
43    |
44 LL |     let _: Option<(i8,)> = Some({(i8,)});
45    |                            ~~~~~~~~~~~~~
46
47 error[E0308]: mismatched types
48   --> $DIR/args-instead-of-tuple-errors.rs:14:34
49    |
50 LL |     let _: Option<(i32,)> = Some(5_usize);
51    |                             ---- ^^^^^^^ expected tuple, found `usize`
52    |                             |
53    |                             arguments to this enum variant are incorrect
54    |
55    = note: expected tuple `(i32,)`
56                found type `usize`
57
58 error[E0308]: mismatched types
59   --> $DIR/args-instead-of-tuple-errors.rs:17:34
60    |
61 LL |     let _: Option<(i32,)> = Some((5_usize));
62    |                             ---- ^^^^^^^^^ expected tuple, found `usize`
63    |                             |
64    |                             arguments to this enum variant are incorrect
65    |
66    = note: expected tuple `(i32,)`
67                found type `usize`
68
69 error: aborting due to 5 previous errors
70
71 Some errors have detailed explanations: E0061, E0308.
72 For more information about an error, try `rustc --explain E0061`.