blob: 30f5f059526649b0fa58a5dfe6629078c6a516fd (
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
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
|
error[E0425]: cannot find value `whiskers` in this scope
--> $DIR/issue-2356.rs:39:5
|
LL | whiskers -= other;
| ^^^^^^^^ a field by this name exists in `Self`
error[E0424]: expected value, found module `self`
--> $DIR/issue-2356.rs:65:8
|
LL | fn meow() {
| ---- this function doesn't have a `self` parameter
LL | if self.whiskers > 3 {
| ^^^^ `self` value is a keyword only available in methods with a `self` parameter
|
help: add a `self` receiver parameter to make the associated `fn` a method
|
LL | fn meow(&self) {
| +++++
error[E0425]: cannot find value `whiskers` in this scope
--> $DIR/issue-2356.rs:79:5
|
LL | whiskers = 0;
| ^^^^^^^^ help: you might have meant to use the available field: `self.whiskers`
error[E0425]: cannot find value `whiskers` in this scope
--> $DIR/issue-2356.rs:84:5
|
LL | whiskers = 4;
| ^^^^^^^^ a field by this name exists in `Self`
error[E0424]: expected value, found module `self`
--> $DIR/issue-2356.rs:92:5
|
LL | fn main() {
| ---- this function can't have a `self` parameter
LL | self += 1;
| ^^^^ `self` value is a keyword only available in methods with a `self` parameter
error[E0425]: cannot find function `shave` in this scope
--> $DIR/issue-2356.rs:17:5
|
LL | shave();
| ^^^^^ not found in this scope
error[E0425]: cannot find function `clone` in this scope
--> $DIR/issue-2356.rs:24:5
|
LL | clone();
| ^^^^^ help: you might have meant to call the method: `self.clone`
error[E0425]: cannot find function `default` in this scope
--> $DIR/issue-2356.rs:31:5
|
LL | default();
| ^^^^^^^ help: you might have meant to call the associated function: `Self::default`
error[E0425]: cannot find function `shave` in this scope
--> $DIR/issue-2356.rs:41:5
|
LL | shave(4);
| ^^^^^ help: you might have meant to call the associated function: `Self::shave`
error[E0425]: cannot find function `purr` in this scope
--> $DIR/issue-2356.rs:43:5
|
LL | purr();
| ^^^^ not found in this scope
error[E0425]: cannot find function `static_method` in this scope
--> $DIR/issue-2356.rs:52:9
|
LL | static_method();
| ^^^^^^^^^^^^^ not found in this scope
|
help: consider using the associated function
|
LL | Self::static_method();
| ++++++
error[E0425]: cannot find function `purr` in this scope
--> $DIR/issue-2356.rs:54:9
|
LL | purr();
| ^^^^ not found in this scope
error[E0425]: cannot find function `purr` in this scope
--> $DIR/issue-2356.rs:56:9
|
LL | purr();
| ^^^^ not found in this scope
error[E0425]: cannot find function `purr` in this scope
--> $DIR/issue-2356.rs:58:9
|
LL | purr();
| ^^^^ not found in this scope
error[E0425]: cannot find function `grow_older` in this scope
--> $DIR/issue-2356.rs:72:5
|
LL | grow_older();
| ^^^^^^^^^^ not found in this scope
|
help: consider using the associated function
|
LL | Self::grow_older();
| ++++++
error[E0425]: cannot find function `shave` in this scope
--> $DIR/issue-2356.rs:74:5
|
LL | shave();
| ^^^^^ not found in this scope
error[E0425]: cannot find function `purr_louder` in this scope
--> $DIR/issue-2356.rs:86:5
|
LL | purr_louder();
| ^^^^^^^^^^^ not found in this scope
error: aborting due to 17 previous errors
Some errors have detailed explanations: E0424, E0425.
For more information about an error, try `rustc --explain E0424`.
|