fork/rust

git clone https://git.julia.blue/fork/rust

borsAuto merge of #71365 - Mark-Simulacrum:stable-next, r=Mark-Simulacrum4fb7144ed15

1.43.0
7.8 KiB220 linesraw
1error: `self` parameter is only allowed in associated functions
2  --> $DIR/self-param-semantic-fail.rs:8:11
3   |
4LL |     fn f1(self) {}
5   |           ^^^^ not semantically valid as function parameter
6   |
7   = note: associated functions are those in `impl` or `trait` definitions
8
9error: `self` parameter is only allowed in associated functions
10  --> $DIR/self-param-semantic-fail.rs:10:11
11   |
12LL |     fn f2(mut self) {}
13   |           ^^^^^^^^ not semantically valid as function parameter
14   |
15   = note: associated functions are those in `impl` or `trait` definitions
16
17error: `self` parameter is only allowed in associated functions
18  --> $DIR/self-param-semantic-fail.rs:12:11
19   |
20LL |     fn f3(&self) {}
21   |           ^^^^^ not semantically valid as function parameter
22   |
23   = note: associated functions are those in `impl` or `trait` definitions
24
25error: `self` parameter is only allowed in associated functions
26  --> $DIR/self-param-semantic-fail.rs:14:11
27   |
28LL |     fn f4(&mut self) {}
29   |           ^^^^^^^^^ not semantically valid as function parameter
30   |
31   = note: associated functions are those in `impl` or `trait` definitions
32
33error: `self` parameter is only allowed in associated functions
34  --> $DIR/self-param-semantic-fail.rs:16:15
35   |
36LL |     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
41error: `self` parameter is only allowed in associated functions
42  --> $DIR/self-param-semantic-fail.rs:18:15
43   |
44LL |     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
49error: `self` parameter is only allowed in associated functions
50  --> $DIR/self-param-semantic-fail.rs:20:11
51   |
52LL |     fn f7(self: u8) {}
53   |           ^^^^ not semantically valid as function parameter
54   |
55   = note: associated functions are those in `impl` or `trait` definitions
56
57error: `self` parameter is only allowed in associated functions
58  --> $DIR/self-param-semantic-fail.rs:22:11
59   |
60LL |     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
65error: `self` parameter is only allowed in associated functions
66  --> $DIR/self-param-semantic-fail.rs:27:11
67   |
68LL |     fn f1(self);
69   |           ^^^^ not semantically valid as function parameter
70   |
71   = note: associated functions are those in `impl` or `trait` definitions
72
73error: `self` parameter is only allowed in associated functions
74  --> $DIR/self-param-semantic-fail.rs:29:11
75   |
76LL |     fn f2(mut self);
77   |           ^^^^^^^^ not semantically valid as function parameter
78   |
79   = note: associated functions are those in `impl` or `trait` definitions
80
81error[E0130]: patterns aren't allowed in foreign function declarations
82  --> $DIR/self-param-semantic-fail.rs:29:11
83   |
84LL |     fn f2(mut self);
85   |           ^^^^^^^^ pattern not allowed in foreign function
86
87error: `self` parameter is only allowed in associated functions
88  --> $DIR/self-param-semantic-fail.rs:32:11
89   |
90LL |     fn f3(&self);
91   |           ^^^^^ not semantically valid as function parameter
92   |
93   = note: associated functions are those in `impl` or `trait` definitions
94
95error: `self` parameter is only allowed in associated functions
96  --> $DIR/self-param-semantic-fail.rs:34:11
97   |
98LL |     fn f4(&mut self);
99   |           ^^^^^^^^^ not semantically valid as function parameter
100   |
101   = note: associated functions are those in `impl` or `trait` definitions
102
103error: `self` parameter is only allowed in associated functions
104  --> $DIR/self-param-semantic-fail.rs:36:15
105   |
106LL |     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
111error: `self` parameter is only allowed in associated functions
112  --> $DIR/self-param-semantic-fail.rs:38:15
113   |
114LL |     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
119error: `self` parameter is only allowed in associated functions
120  --> $DIR/self-param-semantic-fail.rs:40:11
121   |
122LL |     fn f7(self: u8);
123   |           ^^^^ not semantically valid as function parameter
124   |
125   = note: associated functions are those in `impl` or `trait` definitions
126
127error: `self` parameter is only allowed in associated functions
128  --> $DIR/self-param-semantic-fail.rs:42:11
129   |
130LL |     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
135error[E0130]: patterns aren't allowed in foreign function declarations
136  --> $DIR/self-param-semantic-fail.rs:42:11
137   |
138LL |     fn f8(mut self: u8);
139   |           ^^^^^^^^ pattern not allowed in foreign function
140
141error: `self` parameter is only allowed in associated functions
142  --> $DIR/self-param-semantic-fail.rs:47:14
143   |
144LL | type X1 = fn(self);
145   |              ^^^^ not semantically valid as function parameter
146   |
147   = note: associated functions are those in `impl` or `trait` definitions
148
149error: `self` parameter is only allowed in associated functions
150  --> $DIR/self-param-semantic-fail.rs:49:14
151   |
152LL | 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
157error[E0561]: patterns aren't allowed in function pointer types
158  --> $DIR/self-param-semantic-fail.rs:49:14
159   |
160LL | type X2 = fn(mut self);
161   |              ^^^^^^^^
162
163error: `self` parameter is only allowed in associated functions
164  --> $DIR/self-param-semantic-fail.rs:52:14
165   |
166LL | type X3 = fn(&self);
167   |              ^^^^^ not semantically valid as function parameter
168   |
169   = note: associated functions are those in `impl` or `trait` definitions
170
171error: `self` parameter is only allowed in associated functions
172  --> $DIR/self-param-semantic-fail.rs:54:14
173   |
174LL | 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
179error: `self` parameter is only allowed in associated functions
180  --> $DIR/self-param-semantic-fail.rs:56:22
181   |
182LL | 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
187error: `self` parameter is only allowed in associated functions
188  --> $DIR/self-param-semantic-fail.rs:58:22
189   |
190LL | 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
195error: `self` parameter is only allowed in associated functions
196  --> $DIR/self-param-semantic-fail.rs:60:14
197   |
198LL | 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
203error: `self` parameter is only allowed in associated functions
204  --> $DIR/self-param-semantic-fail.rs:62:14
205   |
206LL | 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
211error[E0561]: patterns aren't allowed in function pointer types
212  --> $DIR/self-param-semantic-fail.rs:62:14
213   |
214LL | type X8 = fn(mut self: u8);
215   |              ^^^^^^^^
216
217error: aborting due to 28 previous errors
218
219Some errors have detailed explanations: E0130, E0561.
220For more information about an error, try `rustc --explain E0130`.