1 error: `self` parameter is only allowed in associated functions
2 --> $DIR/self-param-semantic-fail.rs:8:11
5 | ^^^^ not semantically valid as function parameter
7 = note: associated functions are those in `impl` or `trait` definitions
9 error: `self` parameter is only allowed in associated functions
10 --> $DIR/self-param-semantic-fail.rs:10:11
12 LL | fn f2(mut self) {}
13 | ^^^^^^^^ not semantically valid as function parameter
15 = note: associated functions are those in `impl` or `trait` definitions
17 error: `self` parameter is only allowed in associated functions
18 --> $DIR/self-param-semantic-fail.rs:12:11
21 | ^^^^^ not semantically valid as function parameter
23 = note: associated functions are those in `impl` or `trait` definitions
25 error: `self` parameter is only allowed in associated functions
26 --> $DIR/self-param-semantic-fail.rs:14:11
28 LL | fn f4(&mut self) {}
29 | ^^^^^^^^^ not semantically valid as function parameter
31 = note: associated functions are those in `impl` or `trait` definitions
33 error: `self` parameter is only allowed in associated functions
34 --> $DIR/self-param-semantic-fail.rs:16:15
36 LL | fn f5<'a>(&'a self) {}
37 | ^^^^^^^^ not semantically valid as function parameter
39 = note: associated functions are those in `impl` or `trait` definitions
41 error: `self` parameter is only allowed in associated functions
42 --> $DIR/self-param-semantic-fail.rs:18:15
44 LL | fn f6<'a>(&'a mut self) {}
45 | ^^^^^^^^^^^^ not semantically valid as function parameter
47 = note: associated functions are those in `impl` or `trait` definitions
49 error: `self` parameter is only allowed in associated functions
50 --> $DIR/self-param-semantic-fail.rs:20:11
52 LL | fn f7(self: u8) {}
53 | ^^^^ not semantically valid as function parameter
55 = note: associated functions are those in `impl` or `trait` definitions
57 error: `self` parameter is only allowed in associated functions
58 --> $DIR/self-param-semantic-fail.rs:22:11
60 LL | fn f8(mut self: u8) {}
61 | ^^^^^^^^ not semantically valid as function parameter
63 = note: associated functions are those in `impl` or `trait` definitions
65 error: `self` parameter is only allowed in associated functions
66 --> $DIR/self-param-semantic-fail.rs:27:11
69 | ^^^^ not semantically valid as function parameter
71 = note: associated functions are those in `impl` or `trait` definitions
73 error: `self` parameter is only allowed in associated functions
74 --> $DIR/self-param-semantic-fail.rs:29:11
77 | ^^^^^^^^ not semantically valid as function parameter
79 = note: associated functions are those in `impl` or `trait` definitions
81 error[E0130]: patterns aren't allowed in foreign function declarations
82 --> $DIR/self-param-semantic-fail.rs:29:11
85 | ^^^^^^^^ pattern not allowed in foreign function
87 error: `self` parameter is only allowed in associated functions
88 --> $DIR/self-param-semantic-fail.rs:32:11
91 | ^^^^^ not semantically valid as function parameter
93 = note: associated functions are those in `impl` or `trait` definitions
95 error: `self` parameter is only allowed in associated functions
96 --> $DIR/self-param-semantic-fail.rs:34:11
98 LL | fn f4(&mut self);
99 | ^^^^^^^^^ not semantically valid as function parameter
101 = note: associated functions are those in `impl` or `trait` definitions
103 error: `self` parameter is only allowed in associated functions
104 --> $DIR/self-param-semantic-fail.rs:36:15
106 LL | fn f5<'a>(&'a self);
107 | ^^^^^^^^ not semantically valid as function parameter
109 = note: associated functions are those in `impl` or `trait` definitions
111 error: `self` parameter is only allowed in associated functions
112 --> $DIR/self-param-semantic-fail.rs:38:15
114 LL | fn f6<'a>(&'a mut self);
115 | ^^^^^^^^^^^^ not semantically valid as function parameter
117 = note: associated functions are those in `impl` or `trait` definitions
119 error: `self` parameter is only allowed in associated functions
120 --> $DIR/self-param-semantic-fail.rs:40:11
122 LL | fn f7(self: u8);
123 | ^^^^ not semantically valid as function parameter
125 = note: associated functions are those in `impl` or `trait` definitions
127 error: `self` parameter is only allowed in associated functions
128 --> $DIR/self-param-semantic-fail.rs:42:11
130 LL | fn f8(mut self: u8);
131 | ^^^^^^^^ not semantically valid as function parameter
133 = note: associated functions are those in `impl` or `trait` definitions
135 error[E0130]: patterns aren't allowed in foreign function declarations
136 --> $DIR/self-param-semantic-fail.rs:42:11
138 LL | fn f8(mut self: u8);
139 | ^^^^^^^^ pattern not allowed in foreign function
141 error: `self` parameter is only allowed in associated functions
142 --> $DIR/self-param-semantic-fail.rs:47:14
144 LL | type X1 = fn(self);
145 | ^^^^ not semantically valid as function parameter
147 = note: associated functions are those in `impl` or `trait` definitions
149 error: `self` parameter is only allowed in associated functions
150 --> $DIR/self-param-semantic-fail.rs:49:14
152 LL | type X2 = fn(mut self);
153 | ^^^^^^^^ not semantically valid as function parameter
155 = note: associated functions are those in `impl` or `trait` definitions
157 error[E0561]: patterns aren't allowed in function pointer types
158 --> $DIR/self-param-semantic-fail.rs:49:14
160 LL | type X2 = fn(mut self);
163 error: `self` parameter is only allowed in associated functions
164 --> $DIR/self-param-semantic-fail.rs:52:14
166 LL | type X3 = fn(&self);
167 | ^^^^^ not semantically valid as function parameter
169 = note: associated functions are those in `impl` or `trait` definitions
171 error: `self` parameter is only allowed in associated functions
172 --> $DIR/self-param-semantic-fail.rs:54:14
174 LL | type X4 = fn(&mut self);
175 | ^^^^^^^^^ not semantically valid as function parameter
177 = note: associated functions are those in `impl` or `trait` definitions
179 error: `self` parameter is only allowed in associated functions
180 --> $DIR/self-param-semantic-fail.rs:56:22
182 LL | type X5 = for<'a> fn(&'a self);
183 | ^^^^^^^^ not semantically valid as function parameter
185 = note: associated functions are those in `impl` or `trait` definitions
187 error: `self` parameter is only allowed in associated functions
188 --> $DIR/self-param-semantic-fail.rs:58:22
190 LL | type X6 = for<'a> fn(&'a mut self);
191 | ^^^^^^^^^^^^ not semantically valid as function parameter
193 = note: associated functions are those in `impl` or `trait` definitions
195 error: `self` parameter is only allowed in associated functions
196 --> $DIR/self-param-semantic-fail.rs:60:14
198 LL | type X7 = fn(self: u8);
199 | ^^^^ not semantically valid as function parameter
201 = note: associated functions are those in `impl` or `trait` definitions
203 error: `self` parameter is only allowed in associated functions
204 --> $DIR/self-param-semantic-fail.rs:62:14
206 LL | type X8 = fn(mut self: u8);
207 | ^^^^^^^^ not semantically valid as function parameter
209 = note: associated functions are those in `impl` or `trait` definitions
211 error[E0561]: patterns aren't allowed in function pointer types
212 --> $DIR/self-param-semantic-fail.rs:62:14
214 LL | type X8 = fn(mut self: u8);
217 error: aborting due to 28 previous errors
219 Some errors have detailed explanations: E0130, E0561.
220 For more information about an error, try `rustc --explain E0130`.