]> git.lizzy.rs Git - rust.git/blob - src/test/ui/suggestions/args-instead-of-tuple-errors.stderr
Simplify attribute handling in `parse_bottom_expr`.
[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 of type `{integer}` unexpected
6    |                                       |
7    |                                       expected tuple, found integer
8    |
9    = note: expected tuple `(i32, bool)`
10                found type `{integer}`
11 note: tuple variant defined here
12   --> $SRC_DIR/core/src/option.rs:LL:COL
13    |
14 LL |     Some(#[stable(feature = "rust1", since = "1.0.0")] T),
15    |     ^^^^
16 help: remove the extra argument
17    |
18 LL |     let _: Option<(i32, bool)> = Some(/* (i32, bool) */);
19    |                                  ~~~~~~~~~~~~~~~~~~~~~~~
20
21 error[E0061]: this function takes 1 argument but 2 arguments were supplied
22   --> $DIR/args-instead-of-tuple-errors.rs:8:5
23    |
24 LL |     int_bool(1, 2);
25    |     ^^^^^^^^ -  - argument of type `{integer}` unexpected
26    |              |
27    |              expected tuple, found integer
28    |
29    = note: expected tuple `(i32, bool)`
30                found type `{integer}`
31 note: function defined here
32   --> $DIR/args-instead-of-tuple-errors.rs:21:4
33    |
34 LL | fn int_bool(_: (i32, bool)) {
35    |    ^^^^^^^^ --------------
36 help: remove the extra argument
37    |
38 LL |     int_bool(/* (i32, bool) */);
39    |     ~~~~~~~~~~~~~~~~~~~~~~~~~~~
40
41 error[E0061]: this enum variant takes 1 argument but 0 arguments were supplied
42   --> $DIR/args-instead-of-tuple-errors.rs:11:28
43    |
44 LL |     let _: Option<(i8,)> = Some();
45    |                            ^^^^-- an argument of type `(i8,)` is missing
46    |
47 note: tuple variant defined here
48   --> $SRC_DIR/core/src/option.rs:LL:COL
49    |
50 LL |     Some(#[stable(feature = "rust1", since = "1.0.0")] T),
51    |     ^^^^
52 help: provide the argument
53    |
54 LL |     let _: Option<(i8,)> = Some(/* (i8,) */);
55    |                            ~~~~~~~~~~~~~~~~~
56
57 error[E0308]: mismatched types
58   --> $DIR/args-instead-of-tuple-errors.rs:14:34
59    |
60 LL |     let _: Option<(i32,)> = Some(5_usize);
61    |                             ---- ^^^^^^^ expected tuple, found `usize`
62    |                             |
63    |                             arguments to this enum variant are incorrect
64    |
65    = note: expected tuple `(i32,)`
66                found type `usize`
67 note: tuple variant defined here
68   --> $SRC_DIR/core/src/option.rs:LL:COL
69    |
70 LL |     Some(#[stable(feature = "rust1", since = "1.0.0")] T),
71    |     ^^^^
72
73 error[E0308]: mismatched types
74   --> $DIR/args-instead-of-tuple-errors.rs:17:34
75    |
76 LL |     let _: Option<(i32,)> = Some((5_usize));
77    |                             ---- ^^^^^^^^^ expected tuple, found `usize`
78    |                             |
79    |                             arguments to this enum variant are incorrect
80    |
81    = note: expected tuple `(i32,)`
82                found type `usize`
83 note: tuple variant defined here
84   --> $SRC_DIR/core/src/option.rs:LL:COL
85    |
86 LL |     Some(#[stable(feature = "rust1", since = "1.0.0")] T),
87    |     ^^^^
88
89 error: aborting due to 5 previous errors
90
91 Some errors have detailed explanations: E0061, E0308.
92 For more information about an error, try `rustc --explain E0061`.