File: issue-34264.stderr

package info (click to toggle)
rustc 1.87.0%2Bdfsg1-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 925,564 kB
  • sloc: xml: 158,127; python: 36,039; javascript: 19,761; sh: 19,737; cpp: 18,981; ansic: 13,133; asm: 4,376; makefile: 710; perl: 29; lisp: 28; ruby: 19; sql: 11
file content (104 lines) | stat: -rw-r--r-- 2,957 bytes parent folder | download | duplicates (12)
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
error: expected one of `:`, `@`, or `|`, found `<`
  --> $DIR/issue-34264.rs:1:14
   |
LL | fn foo(Option<i32>, String) {}
   |              ^ expected one of `:`, `@`, or `|`
   |
   = note: anonymous parameters are removed in the 2018 edition (see RFC 1685)
help: if this is a `self` type, give it a parameter name
   |
LL | fn foo(self: Option<i32>, String) {}
   |        +++++
help: if this is a type, explicitly ignore the parameter name
   |
LL | fn foo(_: Option<i32>, String) {}
   |        ++

error: expected one of `:`, `@`, or `|`, found `)`
  --> $DIR/issue-34264.rs:1:27
   |
LL | fn foo(Option<i32>, String) {}
   |                           ^ expected one of `:`, `@`, or `|`
   |
   = note: anonymous parameters are removed in the 2018 edition (see RFC 1685)
help: if this is a parameter name, give it a type
   |
LL | fn foo(Option<i32>, String: TypeName) {}
   |                           ++++++++++
help: if this is a type, explicitly ignore the parameter name
   |
LL | fn foo(Option<i32>, _: String) {}
   |                     ++

error: expected one of `:`, `@`, or `|`, found `,`
  --> $DIR/issue-34264.rs:3:9
   |
LL | fn bar(x, y: usize) {}
   |         ^ expected one of `:`, `@`, or `|`
   |
   = note: anonymous parameters are removed in the 2018 edition (see RFC 1685)
help: if this is a `self` type, give it a parameter name
   |
LL | fn bar(self: x, y: usize) {}
   |        +++++
help: if this is a parameter name, give it a type
   |
LL | fn bar(x: TypeName, y: usize) {}
   |         ++++++++++
help: if this is a type, explicitly ignore the parameter name
   |
LL | fn bar(_: x, y: usize) {}
   |        ++

error[E0061]: this function takes 2 arguments but 3 arguments were supplied
  --> $DIR/issue-34264.rs:7:5
   |
LL |     foo(Some(42), 2, "");
   |     ^^^              -- unexpected argument #3 of type `&'static str`
   |
note: function defined here
  --> $DIR/issue-34264.rs:1:4
   |
LL | fn foo(Option<i32>, String) {}
   |    ^^^
help: remove the extra argument
   |
LL -     foo(Some(42), 2, "");
LL +     foo(Some(42), 2);
   |

error[E0308]: mismatched types
  --> $DIR/issue-34264.rs:8:13
   |
LL |     bar("", "");
   |     ---     ^^ expected `usize`, found `&str`
   |     |
   |     arguments to this function are incorrect
   |
note: function defined here
  --> $DIR/issue-34264.rs:3:4
   |
LL | fn bar(x, y: usize) {}
   |    ^^^    --------

error[E0061]: this function takes 2 arguments but 3 arguments were supplied
  --> $DIR/issue-34264.rs:10:5
   |
LL |     bar(1, 2, 3);
   |     ^^^       - unexpected argument #3 of type `{integer}`
   |
note: function defined here
  --> $DIR/issue-34264.rs:3:4
   |
LL | fn bar(x, y: usize) {}
   |    ^^^
help: remove the extra argument
   |
LL -     bar(1, 2, 3);
LL +     bar(1, 2);
   |

error: aborting due to 6 previous errors

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