@@ -17,31 +17,31 @@ LL | #[inline = "2100"] fn f() { }
17
17
= note: for more information, see issue #57571 <https://github.com/rust-lang/rust/issues/57571>
18
18
19
19
error: `start` attribute can only be used on functions
20
- --> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:109 :1
20
+ --> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:119 :1
21
21
|
22
22
LL | #[start]
23
23
| ^^^^^^^^
24
24
25
25
error: `start` attribute can only be used on functions
26
- --> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:112 :17
26
+ --> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:122 :17
27
27
|
28
28
LL | mod inner { #![start] }
29
29
| ^^^^^^^^^
30
30
31
31
error: `start` attribute can only be used on functions
32
- --> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:117 :5
32
+ --> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:127 :5
33
33
|
34
34
LL | #[start] struct S;
35
35
| ^^^^^^^^
36
36
37
37
error: `start` attribute can only be used on functions
38
- --> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:120 :5
38
+ --> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:130 :5
39
39
|
40
40
LL | #[start] type T = S;
41
41
| ^^^^^^^^
42
42
43
43
error: `start` attribute can only be used on functions
44
- --> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:123 :5
44
+ --> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:133 :5
45
45
|
46
46
LL | #[start] impl S { }
47
47
| ^^^^^^^^
76
76
LL | | }
77
77
| |_- not an `extern crate` item
78
78
79
- error: attribute should be applied to a function or static
79
+ error: attribute should be applied to a free function, impl method or static
80
80
--> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:85:1
81
81
|
82
82
LL | #[export_name = "2200"]
@@ -87,17 +87,17 @@ LL | |
87
87
LL | |
88
88
LL | | mod inner { #![export_name="2200"] }
89
89
... |
90
- LL | |
90
+ LL | | }
91
91
LL | | }
92
- | |_- not a function or static
92
+ | |_- not a free function, impl method or static
93
93
94
94
error: attribute should be applied to an `extern crate` item
95
95
--> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:25:1
96
96
|
97
97
LL | #![no_link]
98
98
| ^^^^^^^^^^^
99
99
100
- error: attribute should be applied to a function or static
100
+ error: attribute should be applied to a free function, impl method or static
101
101
--> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:27:1
102
102
|
103
103
LL | #![export_name = "2200"]
@@ -199,31 +199,43 @@ error: attribute should be applied to an `extern crate` item
199
199
LL | #[no_link] impl S { }
200
200
| ^^^^^^^^^^ ---------- not an `extern crate` item
201
201
202
- error: attribute should be applied to a function or static
202
+ error: attribute should be applied to a free function, impl method or static
203
203
--> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:90:17
204
204
|
205
205
LL | mod inner { #![export_name="2200"] }
206
- | ------------^^^^^^^^^^^^^^^^^^^^^^-- not a function or static
206
+ | ------------^^^^^^^^^^^^^^^^^^^^^^-- not a free function, impl method or static
207
207
208
- error: attribute should be applied to a function or static
208
+ error: attribute should be applied to a free function, impl method or static
209
209
--> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:96:5
210
210
|
211
211
LL | #[export_name = "2200"] struct S;
212
- | ^^^^^^^^^^^^^^^^^^^^^^^ --------- not a function or static
212
+ | ^^^^^^^^^^^^^^^^^^^^^^^ --------- not a free function, impl method or static
213
213
214
- error: attribute should be applied to a function or static
214
+ error: attribute should be applied to a free function, impl method or static
215
215
--> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:100:5
216
216
|
217
217
LL | #[export_name = "2200"] type T = S;
218
- | ^^^^^^^^^^^^^^^^^^^^^^^ ----------- not a function or static
218
+ | ^^^^^^^^^^^^^^^^^^^^^^^ ----------- not a free function, impl method or static
219
219
220
- error: attribute should be applied to a function or static
220
+ error: attribute should be applied to a free function, impl method or static
221
221
--> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:104:5
222
222
|
223
223
LL | #[export_name = "2200"] impl S { }
224
- | ^^^^^^^^^^^^^^^^^^^^^^^ ---------- not a function or static
224
+ | ^^^^^^^^^^^^^^^^^^^^^^^ ---------- not a free function, impl method or static
225
+
226
+ error: attribute should be applied to a free function, impl method or static
227
+ --> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:109:9
228
+ |
229
+ LL | #[export_name = "2200"] fn foo();
230
+ | ^^^^^^^^^^^^^^^^^^^^^^^ --------- not a free function, impl method or static
231
+
232
+ error: attribute should be applied to a free function, impl method or static
233
+ --> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:113:9
234
+ |
235
+ LL | #[export_name = "2200"] fn bar() {}
236
+ | ^^^^^^^^^^^^^^^^^^^^^^^ ----------- not a free function, impl method or static
225
237
226
- error: aborting due to 32 previous errors
238
+ error: aborting due to 34 previous errors
227
239
228
240
Some errors have detailed explanations: E0518, E0658.
229
241
For more information about an error, try `rustc --explain E0518`.
0 commit comments