mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-27 01:04:03 +00:00
311 lines
9.6 KiB
Plaintext
311 lines
9.6 KiB
Plaintext
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
|
|
|
|
error: attribute must be of the form `#[inline]` or `#[inline(always|never)]`
|
|
--> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:40:5
|
|
|
|
|
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>
|
|
= note: `#[deny(ill_formed_attribute_input)]` on by default
|
|
|
|
error: `start` attribute can only be used on functions
|
|
--> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:119:1
|
|
|
|
|
LL | #[start]
|
|
| ^^^^^^^^
|
|
|
|
error: `start` attribute can only be used on functions
|
|
--> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:122:17
|
|
|
|
|
LL | mod inner { #![start] }
|
|
| ^^^^^^^^^
|
|
|
|
error: `start` attribute can only be used on functions
|
|
--> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:127:5
|
|
|
|
|
LL | #[start] struct S;
|
|
| ^^^^^^^^
|
|
|
|
error: `start` attribute can only be used on functions
|
|
--> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:130:5
|
|
|
|
|
LL | #[start] type T = S;
|
|
| ^^^^^^^^
|
|
|
|
error: `start` attribute can only be used on functions
|
|
--> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:133:5
|
|
|
|
|
LL | #[start] impl S { }
|
|
| ^^^^^^^^
|
|
|
|
error[E0518]: attribute should be applied to function or closure
|
|
--> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:31:1
|
|
|
|
|
LL | #[inline]
|
|
| ^^^^^^^^^
|
|
LL |
|
|
LL | / mod inline {
|
|
LL | |
|
|
LL | |
|
|
LL | | mod inner { #![inline] }
|
|
... |
|
|
LL | |
|
|
LL | | }
|
|
| |_- not a function or closure
|
|
|
|
error: attribute should be applied to an `extern crate` item
|
|
--> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:59:1
|
|
|
|
|
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
|
|
--> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:85:1
|
|
|
|
|
LL | #[export_name = "2200"]
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^
|
|
LL |
|
|
LL | / mod export_name {
|
|
LL | |
|
|
LL | |
|
|
LL | | mod inner { #![export_name="2200"] }
|
|
... |
|
|
LL | | }
|
|
LL | | }
|
|
| |_- not a free function, impl method or static
|
|
|
|
error[E0517]: attribute should be applied to a struct, enum, or union
|
|
--> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:137:8
|
|
|
|
|
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
|
|
--> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:25:1
|
|
|
|
|
LL | #![no_link]
|
|
| ^^^^^^^^^^^ not an `extern crate` item
|
|
|
|
error: attribute should be applied to a free function, impl method or static
|
|
--> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:27:1
|
|
|
|
|
LL | #![export_name = "2200"]
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^ not a free function, impl method or static
|
|
|
|
error[E0518]: attribute should be applied to function or closure
|
|
--> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:29:1
|
|
|
|
|
LL | #![inline]
|
|
| ^^^^^^^^^^ not a function or closure
|
|
|
|
error: `macro_export` attribute cannot be used at crate level
|
|
--> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:12:1
|
|
|
|
|
LL | #![macro_export]
|
|
| ^^^^^^^^^^^^^^^^
|
|
|
|
|
help: perhaps you meant to use an outer attribute
|
|
|
|
|
LL | #[macro_export]
|
|
|
|
|
|
|
error: `rustc_main` attribute cannot be used at crate level
|
|
--> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:14:1
|
|
|
|
|
LL | #![rustc_main]
|
|
| ^^^^^^^^^^^^^^
|
|
|
|
|
help: perhaps you meant to use an outer attribute
|
|
|
|
|
LL | #[rustc_main]
|
|
| ~~~~~~~~~~~~~
|
|
|
|
error: `start` attribute cannot be used at crate level
|
|
--> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:16:1
|
|
|
|
|
LL | #![start]
|
|
| ^^^^^^^^^
|
|
|
|
|
help: perhaps you meant to use an outer attribute
|
|
|
|
|
LL | #[start]
|
|
|
|
|
|
|
error: `repr` attribute cannot be used at crate level
|
|
--> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:18:1
|
|
|
|
|
LL | #![repr()]
|
|
| ^^^^^^^^^^
|
|
|
|
|
help: perhaps you meant to use an outer attribute
|
|
|
|
|
LL | #[repr()]
|
|
|
|
|
|
|
error: `path` attribute cannot be used at crate level
|
|
--> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:20:1
|
|
|
|
|
LL | #![path = "3800"]
|
|
| ^^^^^^^^^^^^^^^^^
|
|
|
|
|
help: perhaps you meant to use an outer attribute
|
|
|
|
|
LL | #[path = "3800"]
|
|
|
|
|
|
|
error: `automatically_derived` attribute cannot be used at crate level
|
|
--> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:22:1
|
|
|
|
|
LL | #![automatically_derived]
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
help: perhaps you meant to use an outer attribute
|
|
|
|
|
LL | #[automatically_derived]
|
|
|
|
|
|
|
error[E0518]: attribute should be applied to function or closure
|
|
--> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:36:17
|
|
|
|
|
LL | mod inner { #![inline] }
|
|
| ------------^^^^^^^^^^-- not a function or closure
|
|
|
|
error[E0518]: attribute should be applied to function or closure
|
|
--> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:46:5
|
|
|
|
|
LL | #[inline] struct S;
|
|
| ^^^^^^^^^ --------- not a function or closure
|
|
|
|
error[E0518]: attribute should be applied to function or closure
|
|
--> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:50:5
|
|
|
|
|
LL | #[inline] type T = S;
|
|
| ^^^^^^^^^ ----------- not a function or closure
|
|
|
|
error[E0518]: attribute should be applied to function or closure
|
|
--> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:54:5
|
|
|
|
|
LL | #[inline] impl S { }
|
|
| ^^^^^^^^^ ---------- not a function or closure
|
|
|
|
error: attribute should be applied to an `extern crate` item
|
|
--> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:64:17
|
|
|
|
|
LL | mod inner { #![no_link] }
|
|
| ------------^^^^^^^^^^^-- not an `extern crate` item
|
|
|
|
error: attribute should be applied to an `extern crate` item
|
|
--> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:68:5
|
|
|
|
|
LL | #[no_link] fn f() { }
|
|
| ^^^^^^^^^^ ---------- not an `extern crate` item
|
|
|
|
error: attribute should be applied to an `extern crate` item
|
|
--> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:72:5
|
|
|
|
|
LL | #[no_link] struct S;
|
|
| ^^^^^^^^^^ --------- not an `extern crate` item
|
|
|
|
error: attribute should be applied to an `extern crate` item
|
|
--> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:76:5
|
|
|
|
|
LL | #[no_link]type T = S;
|
|
| ^^^^^^^^^^----------- not an `extern crate` item
|
|
|
|
error: attribute should be applied to an `extern crate` item
|
|
--> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:80:5
|
|
|
|
|
LL | #[no_link] impl S { }
|
|
| ^^^^^^^^^^ ---------- not an `extern crate` item
|
|
|
|
error: attribute should be applied to a free function, impl method or static
|
|
--> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:90:17
|
|
|
|
|
LL | mod inner { #![export_name="2200"] }
|
|
| ------------^^^^^^^^^^^^^^^^^^^^^^-- not a free function, impl method or static
|
|
|
|
error: attribute should be applied to a free function, impl method or static
|
|
--> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:96:5
|
|
|
|
|
LL | #[export_name = "2200"] struct S;
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^ --------- not a free function, impl method or static
|
|
|
|
error: attribute should be applied to a free function, impl method or static
|
|
--> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:100:5
|
|
|
|
|
LL | #[export_name = "2200"] type T = S;
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^ ----------- not a free function, impl method or static
|
|
|
|
error: attribute should be applied to a free function, impl method or static
|
|
--> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:104:5
|
|
|
|
|
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
|
|
--> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:109: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
|
|
--> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:113:9
|
|
|
|
|
LL | #[export_name = "2200"] fn bar() {}
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^ ----------- not a free function, impl method or static
|
|
|
|
error[E0517]: attribute should be applied to a struct, enum, or union
|
|
--> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:141:25
|
|
|
|
|
LL | mod inner { #![repr(C)] }
|
|
| --------------------^---- not a struct, enum, or union
|
|
|
|
error[E0517]: attribute should be applied to a struct, enum, or union
|
|
--> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:145:12
|
|
|
|
|
LL | #[repr(C)] fn f() { }
|
|
| ^ ---------- not a struct, enum, or union
|
|
|
|
error[E0517]: attribute should be applied to a struct, enum, or union
|
|
--> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:151:12
|
|
|
|
|
LL | #[repr(C)] type T = S;
|
|
| ^ ----------- not a struct, enum, or union
|
|
|
|
error[E0517]: attribute should be applied to a struct, enum, or union
|
|
--> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:155:12
|
|
|
|
|
LL | #[repr(C)] impl S { }
|
|
| ^ ---------- not a struct, enum, or union
|
|
|
|
error: aborting due to 39 previous errors
|
|
|
|
Some errors have detailed explanations: E0517, E0518, E0658.
|
|
For more information about an error, try `rustc --explain E0517`.
|