]> git.lizzy.rs Git - rust.git/blob - tests/ui/parser/self-param-semantic-fail.stderr
Auto merge of #107478 - compiler-errors:anon-enum-tys-are-ambiguous, r=estebank
[rust.git] / tests / ui / parser / self-param-semantic-fail.stderr
1 error: `self` parameter is only allowed in associated functions
2   --> $DIR/self-param-semantic-fail.rs:8:11
3    |
4 LL |     fn f1(self) {}
5    |           ^^^^ not semantically valid as function parameter
6    |
7    = note: associated functions are those in `impl` or `trait` definitions
8
9 error: `self` parameter is only allowed in associated functions
10   --> $DIR/self-param-semantic-fail.rs:10:11
11    |
12 LL |     fn f2(mut self) {}
13    |           ^^^^^^^^ not semantically valid as function parameter
14    |
15    = note: associated functions are those in `impl` or `trait` definitions
16
17 error: `self` parameter is only allowed in associated functions
18   --> $DIR/self-param-semantic-fail.rs:12:11
19    |
20 LL |     fn f3(&self) {}
21    |           ^^^^^ not semantically valid as function parameter
22    |
23    = note: associated functions are those in `impl` or `trait` definitions
24
25 error: `self` parameter is only allowed in associated functions
26   --> $DIR/self-param-semantic-fail.rs:14:11
27    |
28 LL |     fn f4(&mut self) {}
29    |           ^^^^^^^^^ not semantically valid as function parameter
30    |
31    = note: associated functions are those in `impl` or `trait` definitions
32
33 error: `self` parameter is only allowed in associated functions
34   --> $DIR/self-param-semantic-fail.rs:16:15
35    |
36 LL |     fn f5<'a>(&'a self) {}
37    |               ^^^^^^^^ not semantically valid as function parameter
38    |
39    = note: associated functions are those in `impl` or `trait` definitions
40
41 error: `self` parameter is only allowed in associated functions
42   --> $DIR/self-param-semantic-fail.rs:18:15
43    |
44 LL |     fn f6<'a>(&'a mut self) {}
45    |               ^^^^^^^^^^^^ not semantically valid as function parameter
46    |
47    = note: associated functions are those in `impl` or `trait` definitions
48
49 error: `self` parameter is only allowed in associated functions
50   --> $DIR/self-param-semantic-fail.rs:20:11
51    |
52 LL |     fn f7(self: u8) {}
53    |           ^^^^ not semantically valid as function parameter
54    |
55    = note: associated functions are those in `impl` or `trait` definitions
56
57 error: `self` parameter is only allowed in associated functions
58   --> $DIR/self-param-semantic-fail.rs:22:11
59    |
60 LL |     fn f8(mut self: u8) {}
61    |           ^^^^^^^^ not semantically valid as function parameter
62    |
63    = note: associated functions are those in `impl` or `trait` definitions
64
65 error: `self` parameter is only allowed in associated functions
66   --> $DIR/self-param-semantic-fail.rs:27:11
67    |
68 LL |     fn f1(self);
69    |           ^^^^ not semantically valid as function parameter
70    |
71    = note: associated functions are those in `impl` or `trait` definitions
72
73 error: `self` parameter is only allowed in associated functions
74   --> $DIR/self-param-semantic-fail.rs:29:11
75    |
76 LL |     fn f2(mut self);
77    |           ^^^^^^^^ not semantically valid as function parameter
78    |
79    = note: associated functions are those in `impl` or `trait` definitions
80
81 error[E0130]: patterns aren't allowed in foreign function declarations
82   --> $DIR/self-param-semantic-fail.rs:29:11
83    |
84 LL |     fn f2(mut self);
85    |           ^^^^^^^^ pattern not allowed in foreign function
86
87 error: `self` parameter is only allowed in associated functions
88   --> $DIR/self-param-semantic-fail.rs:32:11
89    |
90 LL |     fn f3(&self);
91    |           ^^^^^ not semantically valid as function parameter
92    |
93    = note: associated functions are those in `impl` or `trait` definitions
94
95 error: `self` parameter is only allowed in associated functions
96   --> $DIR/self-param-semantic-fail.rs:34:11
97    |
98 LL |     fn f4(&mut self);
99    |           ^^^^^^^^^ not semantically valid as function parameter
100    |
101    = note: associated functions are those in `impl` or `trait` definitions
102
103 error: `self` parameter is only allowed in associated functions
104   --> $DIR/self-param-semantic-fail.rs:36:15
105    |
106 LL |     fn f5<'a>(&'a self);
107    |               ^^^^^^^^ not semantically valid as function parameter
108    |
109    = note: associated functions are those in `impl` or `trait` definitions
110
111 error: `self` parameter is only allowed in associated functions
112   --> $DIR/self-param-semantic-fail.rs:38:15
113    |
114 LL |     fn f6<'a>(&'a mut self);
115    |               ^^^^^^^^^^^^ not semantically valid as function parameter
116    |
117    = note: associated functions are those in `impl` or `trait` definitions
118
119 error: `self` parameter is only allowed in associated functions
120   --> $DIR/self-param-semantic-fail.rs:40:11
121    |
122 LL |     fn f7(self: u8);
123    |           ^^^^ not semantically valid as function parameter
124    |
125    = note: associated functions are those in `impl` or `trait` definitions
126
127 error: `self` parameter is only allowed in associated functions
128   --> $DIR/self-param-semantic-fail.rs:42:11
129    |
130 LL |     fn f8(mut self: u8);
131    |           ^^^^^^^^ not semantically valid as function parameter
132    |
133    = note: associated functions are those in `impl` or `trait` definitions
134
135 error[E0130]: patterns aren't allowed in foreign function declarations
136   --> $DIR/self-param-semantic-fail.rs:42:11
137    |
138 LL |     fn f8(mut self: u8);
139    |           ^^^^^^^^ pattern not allowed in foreign function
140
141 error: `self` parameter is only allowed in associated functions
142   --> $DIR/self-param-semantic-fail.rs:47:14
143    |
144 LL | type X1 = fn(self);
145    |              ^^^^ not semantically valid as function parameter
146    |
147    = note: associated functions are those in `impl` or `trait` definitions
148
149 error: `self` parameter is only allowed in associated functions
150   --> $DIR/self-param-semantic-fail.rs:49:14
151    |
152 LL | type X2 = fn(mut self);
153    |              ^^^^^^^^ not semantically valid as function parameter
154    |
155    = note: associated functions are those in `impl` or `trait` definitions
156
157 error[E0561]: patterns aren't allowed in function pointer types
158   --> $DIR/self-param-semantic-fail.rs:49:14
159    |
160 LL | type X2 = fn(mut self);
161    |              ^^^^^^^^
162
163 error: `self` parameter is only allowed in associated functions
164   --> $DIR/self-param-semantic-fail.rs:52:14
165    |
166 LL | type X3 = fn(&self);
167    |              ^^^^^ not semantically valid as function parameter
168    |
169    = note: associated functions are those in `impl` or `trait` definitions
170
171 error: `self` parameter is only allowed in associated functions
172   --> $DIR/self-param-semantic-fail.rs:54:14
173    |
174 LL | type X4 = fn(&mut self);
175    |              ^^^^^^^^^ not semantically valid as function parameter
176    |
177    = note: associated functions are those in `impl` or `trait` definitions
178
179 error: `self` parameter is only allowed in associated functions
180   --> $DIR/self-param-semantic-fail.rs:56:22
181    |
182 LL | type X5 = for<'a> fn(&'a self);
183    |                      ^^^^^^^^ not semantically valid as function parameter
184    |
185    = note: associated functions are those in `impl` or `trait` definitions
186
187 error: `self` parameter is only allowed in associated functions
188   --> $DIR/self-param-semantic-fail.rs:58:22
189    |
190 LL | type X6 = for<'a> fn(&'a mut self);
191    |                      ^^^^^^^^^^^^ not semantically valid as function parameter
192    |
193    = note: associated functions are those in `impl` or `trait` definitions
194
195 error: `self` parameter is only allowed in associated functions
196   --> $DIR/self-param-semantic-fail.rs:60:14
197    |
198 LL | type X7 = fn(self: u8);
199    |              ^^^^ not semantically valid as function parameter
200    |
201    = note: associated functions are those in `impl` or `trait` definitions
202
203 error: `self` parameter is only allowed in associated functions
204   --> $DIR/self-param-semantic-fail.rs:62:14
205    |
206 LL | type X8 = fn(mut self: u8);
207    |              ^^^^^^^^ not semantically valid as function parameter
208    |
209    = note: associated functions are those in `impl` or `trait` definitions
210
211 error[E0561]: patterns aren't allowed in function pointer types
212   --> $DIR/self-param-semantic-fail.rs:62:14
213    |
214 LL | type X8 = fn(mut self: u8);
215    |              ^^^^^^^^
216
217 error: aborting due to 28 previous errors
218
219 Some errors have detailed explanations: E0130, E0561.
220 For more information about an error, try `rustc --explain E0130`.