about summary refs log tree commit diff
path: root/tests/ui/parser/suggest-self-in-bare-function.stderr
blob: 40cbe5575fd6b6ba131219b39ddfcbdbff423708 (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
error: expected one of `:`, `@`, or `|`, found `)`
  --> $DIR/suggest-self-in-bare-function.rs:7:17
   |
LL | fn is_even(value) -> bool {
   |                 ^ expected one of `:`, `@`, or `|`
   |
help: if this is a parameter name, give it a type
   |
LL | fn is_even(value: TypeName) -> bool {
   |                 ++++++++++
help: if this is a type, explicitly ignore the parameter name
   |
LL | fn is_even(_: value) -> bool {
   |            ++

error: expected one of `:`, `@`, or `|`, found `)`
  --> $DIR/suggest-self-in-bare-function.rs:14:21
   |
LL |     fn is_even(value) -> bool {
   |                     ^ expected one of `:`, `@`, or `|`
   |
help: if this is a `self` type, give it a parameter name
   |
LL |     fn is_even(self: value) -> bool {
   |                +++++
help: if this is a parameter name, give it a type
   |
LL |     fn is_even(value: TypeName) -> bool {
   |                     ++++++++++
help: if this is a type, explicitly ignore the parameter name
   |
LL |     fn is_even(_: value) -> bool {
   |                ++

error: expected one of `:`, `@`, or `|`, found `)`
  --> $DIR/suggest-self-in-bare-function.rs:20:21
   |
LL |     fn is_even(value) -> bool {
   |                     ^ 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 is_even(self: value) -> bool {
   |                +++++
help: if this is a parameter name, give it a type
   |
LL |     fn is_even(value: TypeName) -> bool {
   |                     ++++++++++
help: if this is a type, explicitly ignore the parameter name
   |
LL |     fn is_even(_: value) -> bool {
   |                ++

error: aborting due to 3 previous errors