@@ -17,31 +17,31 @@ LL | #[inline = "2100"] fn f() { }
1717 = note: for more information, see issue #57571 <https://github.com/rust-lang/rust/issues/57571>
1818
1919error: `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
2121 |
2222LL | #[start]
2323 | ^^^^^^^^
2424
2525error: `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
2727 |
2828LL | mod inner { #![start] }
2929 | ^^^^^^^^^
3030
3131error: `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
3333 |
3434LL | #[start] struct S;
3535 | ^^^^^^^^
3636
3737error: `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
3939 |
4040LL | #[start] type T = S;
4141 | ^^^^^^^^
4242
4343error: `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
4545 |
4646LL | #[start] impl S { }
4747 | ^^^^^^^^
7676LL | | }
7777 | |_- not an `extern crate` item
7878
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
8080 --> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:85:1
8181 |
8282LL | #[export_name = "2200"]
@@ -87,17 +87,17 @@ LL | |
8787LL | |
8888LL | | mod inner { #![export_name="2200"] }
8989... |
90- LL | |
90+ LL | | }
9191LL | | }
92- | |_- not a function or static
92+ | |_- not a free function, impl method or static
9393
9494error: attribute should be applied to an `extern crate` item
9595 --> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:25:1
9696 |
9797LL | #![no_link]
9898 | ^^^^^^^^^^^
9999
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
101101 --> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:27:1
102102 |
103103LL | #![export_name = "2200"]
@@ -199,31 +199,43 @@ error: attribute should be applied to an `extern crate` item
199199LL | #[no_link] impl S { }
200200 | ^^^^^^^^^^ ---------- not an `extern crate` item
201201
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
203203 --> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:90:17
204204 |
205205LL | mod inner { #![export_name="2200"] }
206- | ------------^^^^^^^^^^^^^^^^^^^^^^-- not a function or static
206+ | ------------^^^^^^^^^^^^^^^^^^^^^^-- not a free function, impl method or static
207207
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
209209 --> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:96:5
210210 |
211211LL | #[export_name = "2200"] struct S;
212- | ^^^^^^^^^^^^^^^^^^^^^^^ --------- not a function or static
212+ | ^^^^^^^^^^^^^^^^^^^^^^^ --------- not a free function, impl method or static
213213
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
215215 --> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:100:5
216216 |
217217LL | #[export_name = "2200"] type T = S;
218- | ^^^^^^^^^^^^^^^^^^^^^^^ ----------- not a function or static
218+ | ^^^^^^^^^^^^^^^^^^^^^^^ ----------- not a free function, impl method or static
219219
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
221221 --> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:104:5
222222 |
223223LL | #[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
225237
226- error: aborting due to 32 previous errors
238+ error: aborting due to 34 previous errors
227239
228240Some errors have detailed explanations: E0518, E0658.
229241For more information about an error, try `rustc --explain E0518`.
0 commit comments