summaryrefslogtreecommitdiffstats
path: root/tests/ui/suggestions/args-instead-of-tuple-errors.stderr
blob: 510b99bb5af73f5d3295519fbaccfd431e36ebb7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
error[E0061]: this enum variant takes 1 argument but 2 arguments were supplied
  --> $DIR/args-instead-of-tuple-errors.rs:6:34
   |
LL |     let _: Option<(i32, bool)> = Some(1, 2);
   |                                  ^^^^    - unexpected argument of type `{integer}`
   |
note: expected `(i32, bool)`, found integer
  --> $DIR/args-instead-of-tuple-errors.rs:6:39
   |
LL |     let _: Option<(i32, bool)> = Some(1, 2);
   |                                       ^
   = note: expected tuple `(i32, bool)`
               found type `{integer}`
help: the type constructed contains `{integer}` due to the type of the argument passed
  --> $DIR/args-instead-of-tuple-errors.rs:6:34
   |
LL |     let _: Option<(i32, bool)> = Some(1, 2);
   |                                  ^^^^^-^^^^
   |                                       |
   |                                       this argument influences the type of `Some`
note: tuple variant defined here
  --> $SRC_DIR/core/src/option.rs:LL:COL
help: remove the extra argument
   |
LL -     let _: Option<(i32, bool)> = Some(1, 2);
LL +     let _: Option<(i32, bool)> = Some(/* (i32, bool) */);
   |

error[E0061]: this function takes 1 argument but 2 arguments were supplied
  --> $DIR/args-instead-of-tuple-errors.rs:8:5
   |
LL |     int_bool(1, 2);
   |     ^^^^^^^^    - unexpected argument of type `{integer}`
   |
note: expected `(i32, bool)`, found integer
  --> $DIR/args-instead-of-tuple-errors.rs:8:14
   |
LL |     int_bool(1, 2);
   |              ^
   = note: expected tuple `(i32, bool)`
               found type `{integer}`
note: function defined here
  --> $DIR/args-instead-of-tuple-errors.rs:21:4
   |
LL | fn int_bool(_: (i32, bool)) {
   |    ^^^^^^^^ --------------
help: remove the extra argument
   |
LL -     int_bool(1, 2);
LL +     int_bool(/* (i32, bool) */);
   |

error[E0061]: this enum variant takes 1 argument but 0 arguments were supplied
  --> $DIR/args-instead-of-tuple-errors.rs:11:28
   |
LL |     let _: Option<(i8,)> = Some();
   |                            ^^^^-- an argument of type `(i8,)` is missing
   |
note: tuple variant defined here
  --> $SRC_DIR/core/src/option.rs:LL:COL
help: provide the argument
   |
LL |     let _: Option<(i8,)> = Some(/* (i8,) */);
   |                                ~~~~~~~~~~~~~

error[E0308]: mismatched types
  --> $DIR/args-instead-of-tuple-errors.rs:14:34
   |
LL |     let _: Option<(i32,)> = Some(5_usize);
   |                             ---- ^^^^^^^ expected `(i32,)`, found `usize`
   |                             |
   |                             arguments to this enum variant are incorrect
   |
   = note: expected tuple `(i32,)`
               found type `usize`
help: the type constructed contains `usize` due to the type of the argument passed
  --> $DIR/args-instead-of-tuple-errors.rs:14:29
   |
LL |     let _: Option<(i32,)> = Some(5_usize);
   |                             ^^^^^-------^
   |                                  |
   |                                  this argument influences the type of `Some`
note: tuple variant defined here
  --> $SRC_DIR/core/src/option.rs:LL:COL

error[E0308]: mismatched types
  --> $DIR/args-instead-of-tuple-errors.rs:17:34
   |
LL |     let _: Option<(i32,)> = Some((5_usize));
   |                             ---- ^^^^^^^^^ expected `(i32,)`, found `usize`
   |                             |
   |                             arguments to this enum variant are incorrect
   |
   = note: expected tuple `(i32,)`
               found type `usize`
help: the type constructed contains `usize` due to the type of the argument passed
  --> $DIR/args-instead-of-tuple-errors.rs:17:29
   |
LL |     let _: Option<(i32,)> = Some((5_usize));
   |                             ^^^^^---------^
   |                                  |
   |                                  this argument influences the type of `Some`
note: tuple variant defined here
  --> $SRC_DIR/core/src/option.rs:LL:COL

error: aborting due to 5 previous errors

Some errors have detailed explanations: E0061, E0308.
For more information about an error, try `rustc --explain E0061`.