]> git.lizzy.rs Git - rust.git/blob - tests/ui/suggestions/args-instead-of-tuple-errors.stderr
Rollup merge of #106323 - starkat99:stabilize-f16c_target_feature, r=petrochenkov
[rust.git] / tests / 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 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 note: expected tuple, found integer
28   --> $DIR/args-instead-of-tuple-errors.rs:8:14
29    |
30 LL |     int_bool(1, 2);
31    |              ^
32    = note: expected tuple `(i32, bool)`
33                found type `{integer}`
34 note: function defined here
35   --> $DIR/args-instead-of-tuple-errors.rs:21:4
36    |
37 LL | fn int_bool(_: (i32, bool)) {
38    |    ^^^^^^^^ --------------
39 help: remove the extra argument
40    |
41 LL |     int_bool(/* (i32, bool) */);
42    |             ~~~~~~~~~~~~~~~~~~~
43
44 error[E0061]: this enum variant takes 1 argument but 0 arguments were supplied
45   --> $DIR/args-instead-of-tuple-errors.rs:11:28
46    |
47 LL |     let _: Option<(i8,)> = Some();
48    |                            ^^^^-- an argument of type `(i8,)` is missing
49    |
50 note: tuple variant defined here
51   --> $SRC_DIR/core/src/option.rs:LL:COL
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 error[E0308]: mismatched types
71   --> $DIR/args-instead-of-tuple-errors.rs:17:34
72    |
73 LL |     let _: Option<(i32,)> = Some((5_usize));
74    |                             ---- ^^^^^^^^^ expected tuple, found `usize`
75    |                             |
76    |                             arguments to this enum variant are incorrect
77    |
78    = note: expected tuple `(i32,)`
79                found type `usize`
80 note: tuple variant defined here
81   --> $SRC_DIR/core/src/option.rs:LL:COL
82
83 error: aborting due to 5 previous errors
84
85 Some errors have detailed explanations: E0061, E0308.
86 For more information about an error, try `rustc --explain E0061`.