rust/tests/ui/feature-gates/issue-43106-gating-of-builtin-attrs-error.stderr

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

336 lines
10 KiB
Plaintext
Raw Normal View History

2021-04-08 13:37:38 +00:00
error[E0658]: the `#[rustc_main]` attribute is used internally to specify test entry point function
--> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:14:1
|
LL | #![rustc_main]
| ^^^^^^^^^^^^^^
|
= help: add `#![feature(rustc_attrs)]` to the crate attributes to enable
2024-01-10 06:39:02 +00:00
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
2021-04-08 13:37:38 +00:00
2020-06-14 04:47:42 +00:00
error: attribute must be of the form `#[inline]` or `#[inline(always|never)]`
2024-01-10 06:39:02 +00:00
--> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:47:5
2020-06-14 04:47:42 +00:00
|
LL | #[inline = "2100"] fn f() { }
| ^^^^^^^^^^^^^^^^^^
|
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
= note: for more information, see issue #57571 <https://github.com/rust-lang/rust/issues/57571>
2022-09-18 15:55:36 +00:00
= note: `#[deny(ill_formed_attribute_input)]` on by default
2020-06-14 04:47:42 +00:00
2020-10-03 18:45:39 +00:00
error: `start` attribute can only be used on functions
2024-01-10 06:39:02 +00:00
--> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:126:1
2020-10-03 18:45:39 +00:00
|
LL | #[start]
| ^^^^^^^^
error: `start` attribute can only be used on functions
2024-01-10 06:39:02 +00:00
--> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:129:17
2020-10-03 18:45:39 +00:00
|
LL | mod inner { #![start] }
| ^^^^^^^^^
error: `start` attribute can only be used on functions
2024-01-10 06:39:02 +00:00
--> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:134:5
2020-10-03 18:45:39 +00:00
|
LL | #[start] struct S;
| ^^^^^^^^
error: `start` attribute can only be used on functions
2024-01-10 06:39:02 +00:00
--> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:137:5
2020-10-03 18:45:39 +00:00
|
LL | #[start] type T = S;
| ^^^^^^^^
error: `start` attribute can only be used on functions
2024-01-10 06:39:02 +00:00
--> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:140:5
2020-10-03 18:45:39 +00:00
|
LL | #[start] impl S { }
| ^^^^^^^^
2020-06-14 04:47:42 +00:00
error[E0518]: attribute should be applied to function or closure
2024-01-10 06:39:02 +00:00
--> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:32:1
2020-06-14 04:47:42 +00:00
|
LL | #[inline]
| ^^^^^^^^^
LL |
LL | / mod inline {
LL | |
LL | |
LL | |
2020-06-14 04:47:42 +00:00
... |
LL | |
LL | | }
| |_- not a function or closure
error: attribute should be applied to an `extern crate` item
2024-01-10 06:39:02 +00:00
--> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:66:1
2020-06-14 04:47:42 +00:00
|
LL | #[no_link]
| ^^^^^^^^^^
LL |
LL | / mod no_link {
LL | |
LL | |
LL | | mod inner { #![no_link] }
... |
LL | |
LL | | }
| |_- not an `extern crate` item
error: attribute should be applied to a free function, impl method or static
2024-01-10 06:39:02 +00:00
--> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:92:1
2020-06-14 04:47:42 +00:00
|
LL | #[export_name = "2200"]
| ^^^^^^^^^^^^^^^^^^^^^^^
LL |
LL | / mod export_name {
LL | |
LL | |
LL | | mod inner { #![export_name="2200"] }
... |
LL | | }
2020-06-14 04:47:42 +00:00
LL | | }
| |_- not a free function, impl method or static
2020-06-14 04:47:42 +00:00
2021-09-06 00:16:28 +00:00
error[E0517]: attribute should be applied to a struct, enum, or union
2024-01-10 06:39:02 +00:00
--> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:144:8
2021-09-06 00:16:28 +00:00
|
LL | #[repr(C)]
| ^
LL |
LL | / mod repr {
LL | |
LL | | mod inner { #![repr(C)] }
LL | |
... |
LL | |
LL | | }
| |_- not a struct, enum, or union
error: attribute should be applied to an `extern crate` item
2024-01-10 06:39:02 +00:00
--> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:26:1
|
2020-10-03 18:45:39 +00:00
LL | #![no_link]
| ^^^^^^^^^^^ not an `extern crate` item
error: attribute should be applied to a free function, impl method or static
2024-01-10 06:39:02 +00:00
--> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:28:1
|
2020-10-03 18:45:39 +00:00
LL | #![export_name = "2200"]
| ^^^^^^^^^^^^^^^^^^^^^^^^ not a free function, impl method or static
error[E0518]: attribute should be applied to function or closure
2024-01-10 06:39:02 +00:00
--> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:30:1
|
2020-10-03 18:45:39 +00:00
LL | #![inline]
| ^^^^^^^^^^ not a function or closure
2020-10-03 18:45:39 +00:00
error: `macro_export` attribute cannot be used at crate level
--> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:12:1
2020-10-03 18:45:39 +00:00
|
LL | #![macro_export]
| ^^^^^^^^^^^^^^^^
...
LL | mod inline {
| ------ the inner attribute doesn't annotate this module
|
help: perhaps you meant to use an outer attribute
|
LL - #![macro_export]
LL + #[macro_export]
|
2020-10-03 18:45:39 +00:00
2021-04-08 13:37:38 +00:00
error: `rustc_main` attribute cannot be used at crate level
--> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:14:1
2020-10-03 18:45:39 +00:00
|
2021-04-08 13:37:38 +00:00
LL | #![rustc_main]
| ^^^^^^^^^^^^^^
...
LL | mod inline {
| ------ the inner attribute doesn't annotate this module
|
help: perhaps you meant to use an outer attribute
|
LL - #![rustc_main]
LL + #[rustc_main]
|
2020-10-03 18:45:39 +00:00
error: `start` attribute cannot be used at crate level
2024-01-10 06:39:02 +00:00
--> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:17:1
2020-10-03 18:45:39 +00:00
|
LL | #![start]
| ^^^^^^^^^
...
LL | mod inline {
| ------ the inner attribute doesn't annotate this module
|
help: perhaps you meant to use an outer attribute
|
LL - #![start]
LL + #[start]
|
2020-10-03 18:45:39 +00:00
error: `repr` attribute cannot be used at crate level
2024-01-10 06:39:02 +00:00
--> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:19:1
2020-10-03 18:45:39 +00:00
|
LL | #![repr()]
| ^^^^^^^^^^
...
LL | mod inline {
| ------ the inner attribute doesn't annotate this module
|
help: perhaps you meant to use an outer attribute
|
LL - #![repr()]
LL + #[repr()]
|
2020-10-03 18:45:39 +00:00
error: `path` attribute cannot be used at crate level
2024-01-10 06:39:02 +00:00
--> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:21:1
2020-10-03 18:45:39 +00:00
|
LL | #![path = "3800"]
| ^^^^^^^^^^^^^^^^^
...
LL | mod inline {
| ------ the inner attribute doesn't annotate this module
|
help: perhaps you meant to use an outer attribute
|
LL - #![path = "3800"]
LL + #[path = "3800"]
|
2020-10-03 18:45:39 +00:00
error: `automatically_derived` attribute cannot be used at crate level
2024-01-10 06:39:02 +00:00
--> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:23:1
2020-10-03 18:45:39 +00:00
|
LL | #![automatically_derived]
| ^^^^^^^^^^^^^^^^^^^^^^^^^
...
LL | mod inline {
| ------ the inner attribute doesn't annotate this module
|
help: perhaps you meant to use an outer attribute
|
LL - #![automatically_derived]
LL + #[automatically_derived]
|
2020-06-14 04:47:42 +00:00
error[E0518]: attribute should be applied to function or closure
2024-01-10 06:39:02 +00:00
--> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:43:17
2020-06-14 04:47:42 +00:00
|
LL | mod inner { #![inline] }
| ------------^^^^^^^^^^-- not a function or closure
error[E0518]: attribute should be applied to function or closure
2024-01-10 06:39:02 +00:00
--> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:53:5
2020-06-14 04:47:42 +00:00
|
LL | #[inline] struct S;
| ^^^^^^^^^ --------- not a function or closure
error[E0518]: attribute should be applied to function or closure
2024-01-10 06:39:02 +00:00
--> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:57:5
2020-06-14 04:47:42 +00:00
|
LL | #[inline] type T = S;
| ^^^^^^^^^ ----------- not a function or closure
error[E0518]: attribute should be applied to function or closure
2024-01-10 06:39:02 +00:00
--> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:61:5
2020-06-14 04:47:42 +00:00
|
LL | #[inline] impl S { }
| ^^^^^^^^^ ---------- not a function or closure
error: attribute should be applied to an `extern crate` item
2024-01-10 06:39:02 +00:00
--> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:71:17
2020-06-14 04:47:42 +00:00
|
LL | mod inner { #![no_link] }
| ------------^^^^^^^^^^^-- not an `extern crate` item
error: attribute should be applied to an `extern crate` item
2024-01-10 06:39:02 +00:00
--> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:75:5
2020-06-14 04:47:42 +00:00
|
LL | #[no_link] fn f() { }
| ^^^^^^^^^^ ---------- not an `extern crate` item
error: attribute should be applied to an `extern crate` item
2024-01-10 06:39:02 +00:00
--> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:79:5
2020-06-14 04:47:42 +00:00
|
LL | #[no_link] struct S;
| ^^^^^^^^^^ --------- not an `extern crate` item
error: attribute should be applied to an `extern crate` item
2024-01-10 06:39:02 +00:00
--> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:83:5
2020-06-14 04:47:42 +00:00
|
LL | #[no_link]type T = S;
| ^^^^^^^^^^----------- not an `extern crate` item
error: attribute should be applied to an `extern crate` item
2024-01-10 06:39:02 +00:00
--> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:87:5
2020-06-14 04:47:42 +00:00
|
LL | #[no_link] impl S { }
| ^^^^^^^^^^ ---------- not an `extern crate` item
error: attribute should be applied to a free function, impl method or static
2024-01-10 06:39:02 +00:00
--> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:97:17
2020-06-14 04:47:42 +00:00
|
LL | mod inner { #![export_name="2200"] }
| ------------^^^^^^^^^^^^^^^^^^^^^^-- not a free function, impl method or static
2020-06-14 04:47:42 +00:00
error: attribute should be applied to a free function, impl method or static
2024-01-10 06:39:02 +00:00
--> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:103:5
2020-06-14 04:47:42 +00:00
|
LL | #[export_name = "2200"] struct S;
| ^^^^^^^^^^^^^^^^^^^^^^^ --------- not a free function, impl method or static
2020-06-14 04:47:42 +00:00
error: attribute should be applied to a free function, impl method or static
2024-01-10 06:39:02 +00:00
--> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:107:5
2020-06-14 04:47:42 +00:00
|
LL | #[export_name = "2200"] type T = S;
| ^^^^^^^^^^^^^^^^^^^^^^^ ----------- not a free function, impl method or static
2020-06-14 04:47:42 +00:00
error: attribute should be applied to a free function, impl method or static
2024-01-10 06:39:02 +00:00
--> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:111:5
2020-06-14 04:47:42 +00:00
|
LL | #[export_name = "2200"] impl S { }
| ^^^^^^^^^^^^^^^^^^^^^^^ ---------- not a free function, impl method or static
error: attribute should be applied to a free function, impl method or static
2024-01-10 06:39:02 +00:00
--> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:116:9
|
LL | #[export_name = "2200"] fn foo();
| ^^^^^^^^^^^^^^^^^^^^^^^ --------- not a free function, impl method or static
error: attribute should be applied to a free function, impl method or static
2024-01-10 06:39:02 +00:00
--> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:120:9
|
LL | #[export_name = "2200"] fn bar() {}
| ^^^^^^^^^^^^^^^^^^^^^^^ ----------- not a free function, impl method or static
2020-06-14 04:47:42 +00:00
2021-09-06 00:16:28 +00:00
error[E0517]: attribute should be applied to a struct, enum, or union
2024-01-10 06:39:02 +00:00
--> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:148:25
2021-09-06 00:16:28 +00:00
|
LL | mod inner { #![repr(C)] }
| --------------------^---- not a struct, enum, or union
error[E0517]: attribute should be applied to a struct, enum, or union
2024-01-10 06:39:02 +00:00
--> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:152:12
2021-09-06 00:16:28 +00:00
|
LL | #[repr(C)] fn f() { }
| ^ ---------- not a struct, enum, or union
error[E0517]: attribute should be applied to a struct, enum, or union
2024-01-10 06:39:02 +00:00
--> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:158:12
2021-09-06 00:16:28 +00:00
|
LL | #[repr(C)] type T = S;
| ^ ----------- not a struct, enum, or union
error[E0517]: attribute should be applied to a struct, enum, or union
2024-01-10 06:39:02 +00:00
--> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:162:12
2021-09-06 00:16:28 +00:00
|
LL | #[repr(C)] impl S { }
| ^ ---------- not a struct, enum, or union
error: aborting due to 39 previous errors
2020-06-14 04:47:42 +00:00
2021-09-06 00:16:28 +00:00
Some errors have detailed explanations: E0517, E0518, E0658.
For more information about an error, try `rustc --explain E0517`.