]> git.lizzy.rs Git - rust.git/blob - src/test/ui/parser/inverted-parameters.stderr
Auto merge of #86336 - camsteffen:char-array-pattern, r=joshtriplett
[rust.git] / src / test / ui / parser / inverted-parameters.stderr
1 error: expected one of `:`, `@`, or `|`, found `bar`
2   --> $DIR/inverted-parameters.rs:4:24
3    |
4 LL |     fn foo(&self, &str bar) {}
5    |                   -----^^^
6    |                   |    |
7    |                   |    expected one of `:`, `@`, or `|`
8    |                   help: declare the type after the parameter binding: `<identifier>: <type>`
9
10 error: expected one of `:`, `@`, or `|`, found `quux`
11   --> $DIR/inverted-parameters.rs:10:10
12    |
13 LL | fn baz(S quux, xyzzy: i32) {}
14    |        --^^^^
15    |        | |
16    |        | expected one of `:`, `@`, or `|`
17    |        help: declare the type after the parameter binding: `<identifier>: <type>`
18
19 error: expected one of `:`, `@`, or `|`, found `a`
20   --> $DIR/inverted-parameters.rs:15:12
21    |
22 LL | fn one(i32 a b) {}
23    |            ^ expected one of `:`, `@`, or `|`
24
25 error: expected one of `:` or `|`, found `(`
26   --> $DIR/inverted-parameters.rs:18:23
27    |
28 LL | fn pattern((i32, i32) (a, b)) {}
29    |                       ^ expected one of `:` or `|`
30
31 error: expected one of `:`, `@`, or `|`, found `)`
32   --> $DIR/inverted-parameters.rs:21:12
33    |
34 LL | fn fizz(i32) {}
35    |            ^ expected one of `:`, `@`, or `|`
36    |
37    = note: anonymous parameters are removed in the 2018 edition (see RFC 1685)
38 help: if this is a `self` type, give it a parameter name
39    |
40 LL | fn fizz(self: i32) {}
41    |         +++++
42 help: if this is a parameter name, give it a type
43    |
44 LL | fn fizz(i32: TypeName) {}
45    |            ++++++++++
46 help: if this is a type, explicitly ignore the parameter name
47    |
48 LL | fn fizz(_: i32) {}
49    |         ++
50
51 error: expected one of `:`, `@`, or `|`, found `S`
52   --> $DIR/inverted-parameters.rs:27:23
53    |
54 LL | fn missing_colon(quux S) {}
55    |                  -----^
56    |                  |    |
57    |                  |    expected one of `:`, `@`, or `|`
58    |                  help: declare the type after the parameter binding: `<identifier>: <type>`
59
60 error: aborting due to 6 previous errors
61