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