summaryrefslogtreecommitdiffstats
path: root/tests/ui/parser/self-param-semantic-fail.stderr
blob: e5d679773696b1b760c463a66df89b4aae26a775 (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
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
error: `self` parameter is only allowed in associated functions
  --> $DIR/self-param-semantic-fail.rs:8:11
   |
LL |     fn f1(self) {}
   |           ^^^^ not semantically valid as function parameter
   |
   = note: associated functions are those in `impl` or `trait` definitions

error: `self` parameter is only allowed in associated functions
  --> $DIR/self-param-semantic-fail.rs:10:11
   |
LL |     fn f2(mut self) {}
   |           ^^^^^^^^ not semantically valid as function parameter
   |
   = note: associated functions are those in `impl` or `trait` definitions

error: `self` parameter is only allowed in associated functions
  --> $DIR/self-param-semantic-fail.rs:12:11
   |
LL |     fn f3(&self) {}
   |           ^^^^^ not semantically valid as function parameter
   |
   = note: associated functions are those in `impl` or `trait` definitions

error: `self` parameter is only allowed in associated functions
  --> $DIR/self-param-semantic-fail.rs:14:11
   |
LL |     fn f4(&mut self) {}
   |           ^^^^^^^^^ not semantically valid as function parameter
   |
   = note: associated functions are those in `impl` or `trait` definitions

error: `self` parameter is only allowed in associated functions
  --> $DIR/self-param-semantic-fail.rs:16:15
   |
LL |     fn f5<'a>(&'a self) {}
   |               ^^^^^^^^ not semantically valid as function parameter
   |
   = note: associated functions are those in `impl` or `trait` definitions

error: `self` parameter is only allowed in associated functions
  --> $DIR/self-param-semantic-fail.rs:18:15
   |
LL |     fn f6<'a>(&'a mut self) {}
   |               ^^^^^^^^^^^^ not semantically valid as function parameter
   |
   = note: associated functions are those in `impl` or `trait` definitions

error: `self` parameter is only allowed in associated functions
  --> $DIR/self-param-semantic-fail.rs:20:11
   |
LL |     fn f7(self: u8) {}
   |           ^^^^ not semantically valid as function parameter
   |
   = note: associated functions are those in `impl` or `trait` definitions

error: `self` parameter is only allowed in associated functions
  --> $DIR/self-param-semantic-fail.rs:22:11
   |
LL |     fn f8(mut self: u8) {}
   |           ^^^^^^^^ not semantically valid as function parameter
   |
   = note: associated functions are those in `impl` or `trait` definitions

error: `self` parameter is only allowed in associated functions
  --> $DIR/self-param-semantic-fail.rs:27:11
   |
LL |     fn f1(self);
   |           ^^^^ not semantically valid as function parameter
   |
   = note: associated functions are those in `impl` or `trait` definitions

error: `self` parameter is only allowed in associated functions
  --> $DIR/self-param-semantic-fail.rs:29:11
   |
LL |     fn f2(mut self);
   |           ^^^^^^^^ not semantically valid as function parameter
   |
   = note: associated functions are those in `impl` or `trait` definitions

error[E0130]: patterns aren't allowed in foreign function declarations
  --> $DIR/self-param-semantic-fail.rs:29:11
   |
LL |     fn f2(mut self);
   |           ^^^^^^^^ pattern not allowed in foreign function

error: `self` parameter is only allowed in associated functions
  --> $DIR/self-param-semantic-fail.rs:32:11
   |
LL |     fn f3(&self);
   |           ^^^^^ not semantically valid as function parameter
   |
   = note: associated functions are those in `impl` or `trait` definitions

error: `self` parameter is only allowed in associated functions
  --> $DIR/self-param-semantic-fail.rs:34:11
   |
LL |     fn f4(&mut self);
   |           ^^^^^^^^^ not semantically valid as function parameter
   |
   = note: associated functions are those in `impl` or `trait` definitions

error: `self` parameter is only allowed in associated functions
  --> $DIR/self-param-semantic-fail.rs:36:15
   |
LL |     fn f5<'a>(&'a self);
   |               ^^^^^^^^ not semantically valid as function parameter
   |
   = note: associated functions are those in `impl` or `trait` definitions

error: `self` parameter is only allowed in associated functions
  --> $DIR/self-param-semantic-fail.rs:38:15
   |
LL |     fn f6<'a>(&'a mut self);
   |               ^^^^^^^^^^^^ not semantically valid as function parameter
   |
   = note: associated functions are those in `impl` or `trait` definitions

error: `self` parameter is only allowed in associated functions
  --> $DIR/self-param-semantic-fail.rs:40:11
   |
LL |     fn f7(self: u8);
   |           ^^^^ not semantically valid as function parameter
   |
   = note: associated functions are those in `impl` or `trait` definitions

error: `self` parameter is only allowed in associated functions
  --> $DIR/self-param-semantic-fail.rs:42:11
   |
LL |     fn f8(mut self: u8);
   |           ^^^^^^^^ not semantically valid as function parameter
   |
   = note: associated functions are those in `impl` or `trait` definitions

error[E0130]: patterns aren't allowed in foreign function declarations
  --> $DIR/self-param-semantic-fail.rs:42:11
   |
LL |     fn f8(mut self: u8);
   |           ^^^^^^^^ pattern not allowed in foreign function

error: `self` parameter is only allowed in associated functions
  --> $DIR/self-param-semantic-fail.rs:47:14
   |
LL | type X1 = fn(self);
   |              ^^^^ not semantically valid as function parameter
   |
   = note: associated functions are those in `impl` or `trait` definitions

error: `self` parameter is only allowed in associated functions
  --> $DIR/self-param-semantic-fail.rs:49:14
   |
LL | type X2 = fn(mut self);
   |              ^^^^^^^^ not semantically valid as function parameter
   |
   = note: associated functions are those in `impl` or `trait` definitions

error[E0561]: patterns aren't allowed in function pointer types
  --> $DIR/self-param-semantic-fail.rs:49:14
   |
LL | type X2 = fn(mut self);
   |              ^^^^^^^^

error: `self` parameter is only allowed in associated functions
  --> $DIR/self-param-semantic-fail.rs:52:14
   |
LL | type X3 = fn(&self);
   |              ^^^^^ not semantically valid as function parameter
   |
   = note: associated functions are those in `impl` or `trait` definitions

error: `self` parameter is only allowed in associated functions
  --> $DIR/self-param-semantic-fail.rs:54:14
   |
LL | type X4 = fn(&mut self);
   |              ^^^^^^^^^ not semantically valid as function parameter
   |
   = note: associated functions are those in `impl` or `trait` definitions

error: `self` parameter is only allowed in associated functions
  --> $DIR/self-param-semantic-fail.rs:56:22
   |
LL | type X5 = for<'a> fn(&'a self);
   |                      ^^^^^^^^ not semantically valid as function parameter
   |
   = note: associated functions are those in `impl` or `trait` definitions

error: `self` parameter is only allowed in associated functions
  --> $DIR/self-param-semantic-fail.rs:58:22
   |
LL | type X6 = for<'a> fn(&'a mut self);
   |                      ^^^^^^^^^^^^ not semantically valid as function parameter
   |
   = note: associated functions are those in `impl` or `trait` definitions

error: `self` parameter is only allowed in associated functions
  --> $DIR/self-param-semantic-fail.rs:60:14
   |
LL | type X7 = fn(self: u8);
   |              ^^^^ not semantically valid as function parameter
   |
   = note: associated functions are those in `impl` or `trait` definitions

error: `self` parameter is only allowed in associated functions
  --> $DIR/self-param-semantic-fail.rs:62:14
   |
LL | type X8 = fn(mut self: u8);
   |              ^^^^^^^^ not semantically valid as function parameter
   |
   = note: associated functions are those in `impl` or `trait` definitions

error[E0561]: patterns aren't allowed in function pointer types
  --> $DIR/self-param-semantic-fail.rs:62:14
   |
LL | type X8 = fn(mut self: u8);
   |              ^^^^^^^^

error: aborting due to 28 previous errors

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