File: struct-enum-wrong-args.stderr

package info (click to toggle)
rustc 1.86.0%2Bdfsg1-1
  • links: PTS, VCS
  • area: main
  • in suites: experimental, forky, sid
  • size: 913,560 kB
  • sloc: xml: 158,127; python: 35,921; javascript: 19,689; sh: 19,600; cpp: 18,906; ansic: 13,124; asm: 4,376; makefile: 708; perl: 29; lisp: 29; ruby: 19; sql: 11
file content (132 lines) | stat: -rw-r--r-- 3,794 bytes parent folder | download | duplicates (2)
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
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
error[E0061]: this enum variant takes 1 argument but 2 arguments were supplied
  --> $DIR/struct-enum-wrong-args.rs:6:13
   |
LL |     let _ = Some(3, 2);
   |             ^^^^    - unexpected argument #2 of type `{integer}`
   |
note: tuple variant defined here
  --> $SRC_DIR/core/src/option.rs:LL:COL
help: remove the extra argument
   |
LL -     let _ = Some(3, 2);
LL +     let _ = Some(3);
   |

error[E0061]: this enum variant takes 1 argument but 3 arguments were supplied
  --> $DIR/struct-enum-wrong-args.rs:7:13
   |
LL |     let _ = Ok(3, 6, 2);
   |             ^^    -  - unexpected argument #3 of type `{integer}`
   |                   |
   |                   unexpected argument #2 of type `{integer}`
   |
note: tuple variant defined here
  --> $SRC_DIR/core/src/result.rs:LL:COL
help: remove the extra arguments
   |
LL -     let _ = Ok(3, 6, 2);
LL +     let _ = Ok(3);
   |

error[E0061]: this enum variant takes 1 argument but 0 arguments were supplied
  --> $DIR/struct-enum-wrong-args.rs:8:13
   |
LL |     let _ = Ok();
   |             ^^-- argument #1 is missing
   |
note: tuple variant defined here
  --> $SRC_DIR/core/src/result.rs:LL:COL
help: provide the argument
   |
LL -     let _ = Ok();
LL +     let _ = Ok(/* value */);
   |

error[E0061]: this struct takes 1 argument but 0 arguments were supplied
  --> $DIR/struct-enum-wrong-args.rs:9:13
   |
LL |     let _ = Wrapper();
   |             ^^^^^^^-- argument #1 of type `i32` is missing
   |
note: tuple struct defined here
  --> $DIR/struct-enum-wrong-args.rs:2:8
   |
LL | struct Wrapper(i32);
   |        ^^^^^^^
help: provide the argument
   |
LL -     let _ = Wrapper();
LL +     let _ = Wrapper(/* i32 */);
   |

error[E0061]: this struct takes 1 argument but 2 arguments were supplied
  --> $DIR/struct-enum-wrong-args.rs:10:13
   |
LL |     let _ = Wrapper(5, 2);
   |             ^^^^^^^    - unexpected argument #2 of type `{integer}`
   |
note: tuple struct defined here
  --> $DIR/struct-enum-wrong-args.rs:2:8
   |
LL | struct Wrapper(i32);
   |        ^^^^^^^
help: remove the extra argument
   |
LL -     let _ = Wrapper(5, 2);
LL +     let _ = Wrapper(5);
   |

error[E0061]: this struct takes 2 arguments but 0 arguments were supplied
  --> $DIR/struct-enum-wrong-args.rs:11:13
   |
LL |     let _ = DoubleWrapper();
   |             ^^^^^^^^^^^^^-- two arguments of type `i32` and `i32` are missing
   |
note: tuple struct defined here
  --> $DIR/struct-enum-wrong-args.rs:3:8
   |
LL | struct DoubleWrapper(i32, i32);
   |        ^^^^^^^^^^^^^
help: provide the arguments
   |
LL -     let _ = DoubleWrapper();
LL +     let _ = DoubleWrapper(/* i32 */, /* i32 */);
   |

error[E0061]: this struct takes 2 arguments but 1 argument was supplied
  --> $DIR/struct-enum-wrong-args.rs:12:13
   |
LL |     let _ = DoubleWrapper(5);
   |             ^^^^^^^^^^^^^--- argument #2 of type `i32` is missing
   |
note: tuple struct defined here
  --> $DIR/struct-enum-wrong-args.rs:3:8
   |
LL | struct DoubleWrapper(i32, i32);
   |        ^^^^^^^^^^^^^
help: provide the argument
   |
LL -     let _ = DoubleWrapper(5);
LL +     let _ = DoubleWrapper(5, /* i32 */);
   |

error[E0061]: this struct takes 2 arguments but 3 arguments were supplied
  --> $DIR/struct-enum-wrong-args.rs:13:13
   |
LL |     let _ = DoubleWrapper(5, 2, 7);
   |             ^^^^^^^^^^^^^       - unexpected argument #3 of type `{integer}`
   |
note: tuple struct defined here
  --> $DIR/struct-enum-wrong-args.rs:3:8
   |
LL | struct DoubleWrapper(i32, i32);
   |        ^^^^^^^^^^^^^
help: remove the extra argument
   |
LL -     let _ = DoubleWrapper(5, 2, 7);
LL +     let _ = DoubleWrapper(5, 2);
   |

error: aborting due to 8 previous errors

For more information about this error, try `rustc --explain E0061`.