2024-07-09 19:06:49 -05:00
|
|
|
error[E0452]: malformed lint attribute input
|
2025-07-07 20:48:51 +02:00
|
|
|
--> $DIR/proc-unsafe-attributes.rs:27:16
|
2024-07-09 19:06:49 -05:00
|
|
|
|
|
|
|
|
|
LL | #[unsafe(allow(unsafe(dead_code)))]
|
|
|
|
|
| ^^^^^^^^^^^^^^^^^ bad attribute argument
|
|
|
|
|
|
|
|
|
|
error[E0452]: malformed lint attribute input
|
2025-07-07 20:48:51 +02:00
|
|
|
--> $DIR/proc-unsafe-attributes.rs:27:16
|
2024-07-09 19:06:49 -05:00
|
|
|
|
|
|
|
|
|
LL | #[unsafe(allow(unsafe(dead_code)))]
|
|
|
|
|
| ^^^^^^^^^^^^^^^^^ bad attribute argument
|
|
|
|
|
|
|
|
|
|
|
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
|
|
|
|
|
|
2024-07-02 23:52:16 -05:00
|
|
|
error: `proc_macro` is not an unsafe attribute
|
2024-08-07 01:36:28 -05:00
|
|
|
--> $DIR/proc-unsafe-attributes.rs:1:3
|
2024-07-02 23:52:16 -05:00
|
|
|
|
|
|
|
|
|
LL | #[unsafe(proc_macro)]
|
2024-07-09 19:06:49 -05:00
|
|
|
| ^^^^^^ this is not an unsafe attribute
|
2024-07-02 23:52:16 -05:00
|
|
|
|
|
|
|
|
|
= note: extraneous unsafe is not allowed in attributes
|
|
|
|
|
|
|
|
|
|
error: `proc_macro_derive` is not an unsafe attribute
|
2024-08-07 01:36:28 -05:00
|
|
|
--> $DIR/proc-unsafe-attributes.rs:7:3
|
2024-07-02 23:52:16 -05:00
|
|
|
|
|
|
|
|
|
LL | #[unsafe(proc_macro_derive(Foo))]
|
2024-07-09 19:06:49 -05:00
|
|
|
| ^^^^^^ this is not an unsafe attribute
|
2024-07-02 23:52:16 -05:00
|
|
|
|
|
|
|
|
|
= note: extraneous unsafe is not allowed in attributes
|
|
|
|
|
|
|
|
|
|
error: `proc_macro_attribute` is not an unsafe attribute
|
2025-07-07 20:48:51 +02:00
|
|
|
--> $DIR/proc-unsafe-attributes.rs:18:3
|
2024-07-02 23:52:16 -05:00
|
|
|
|
|
|
|
|
|
LL | #[unsafe(proc_macro_attribute)]
|
2024-07-09 19:06:49 -05:00
|
|
|
| ^^^^^^ this is not an unsafe attribute
|
2024-07-02 23:52:16 -05:00
|
|
|
|
|
|
|
|
|
= note: extraneous unsafe is not allowed in attributes
|
|
|
|
|
|
|
|
|
|
error: `allow` is not an unsafe attribute
|
2025-07-07 20:48:51 +02:00
|
|
|
--> $DIR/proc-unsafe-attributes.rs:23:3
|
2024-07-02 23:52:16 -05:00
|
|
|
|
|
|
|
|
|
LL | #[unsafe(allow(dead_code))]
|
2024-07-09 19:06:49 -05:00
|
|
|
| ^^^^^^ this is not an unsafe attribute
|
2024-07-02 23:52:16 -05:00
|
|
|
|
|
|
|
|
|
= note: extraneous unsafe is not allowed in attributes
|
|
|
|
|
|
2024-07-09 19:06:49 -05:00
|
|
|
error: `allow` is not an unsafe attribute
|
2025-07-07 20:48:51 +02:00
|
|
|
--> $DIR/proc-unsafe-attributes.rs:27:3
|
2024-07-09 19:06:49 -05:00
|
|
|
|
|
|
|
|
|
LL | #[unsafe(allow(unsafe(dead_code)))]
|
|
|
|
|
| ^^^^^^ this is not an unsafe attribute
|
|
|
|
|
|
|
|
|
|
|
= note: extraneous unsafe is not allowed in attributes
|
|
|
|
|
|
|
|
|
|
error: expected identifier, found keyword `unsafe`
|
2025-07-07 20:48:51 +02:00
|
|
|
--> $DIR/proc-unsafe-attributes.rs:27:16
|
2024-07-09 19:06:49 -05:00
|
|
|
|
|
|
|
|
|
LL | #[unsafe(allow(unsafe(dead_code)))]
|
|
|
|
|
| ^^^^^^ expected identifier, found keyword
|
|
|
|
|
|
|
|
|
|
|
help: escape `unsafe` to use it as an identifier
|
|
|
|
|
|
|
|
|
|
|
LL | #[unsafe(allow(r#unsafe(dead_code)))]
|
|
|
|
|
| ++
|
|
|
|
|
|
2024-07-02 23:52:16 -05:00
|
|
|
error: the `#[proc_macro]` attribute is only usable with crates of the `proc-macro` crate type
|
2024-08-07 01:36:28 -05:00
|
|
|
--> $DIR/proc-unsafe-attributes.rs:1:1
|
2024-07-02 23:52:16 -05:00
|
|
|
|
|
|
|
|
|
LL | #[unsafe(proc_macro)]
|
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
|
|
error: the `#[proc_macro_derive]` attribute is only usable with crates of the `proc-macro` crate type
|
2024-08-07 01:36:28 -05:00
|
|
|
--> $DIR/proc-unsafe-attributes.rs:7:1
|
2024-07-02 23:52:16 -05:00
|
|
|
|
|
|
|
|
|
LL | #[unsafe(proc_macro_derive(Foo))]
|
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
|
|
error: the `#[proc_macro_derive]` attribute is only usable with crates of the `proc-macro` crate type
|
2024-08-07 01:36:28 -05:00
|
|
|
--> $DIR/proc-unsafe-attributes.rs:12:1
|
2024-07-02 23:52:16 -05:00
|
|
|
|
|
|
|
|
|
LL | #[proc_macro_derive(unsafe(Foo))]
|
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
|
|
error: the `#[proc_macro_attribute]` attribute is only usable with crates of the `proc-macro` crate type
|
2025-07-07 20:48:51 +02:00
|
|
|
--> $DIR/proc-unsafe-attributes.rs:18:1
|
2024-07-02 23:52:16 -05:00
|
|
|
|
|
|
|
|
|
LL | #[unsafe(proc_macro_attribute)]
|
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
2024-07-09 19:06:49 -05:00
|
|
|
error[E0452]: malformed lint attribute input
|
2025-07-07 20:48:51 +02:00
|
|
|
--> $DIR/proc-unsafe-attributes.rs:27:16
|
2024-07-09 19:06:49 -05:00
|
|
|
|
|
|
|
|
|
LL | #[unsafe(allow(unsafe(dead_code)))]
|
|
|
|
|
| ^^^^^^^^^^^^^^^^^ bad attribute argument
|
|
|
|
|
|
|
|
|
|
|
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
|
|
|
|
|
|
|
|
|
|
error[E0452]: malformed lint attribute input
|
2025-07-07 20:48:51 +02:00
|
|
|
--> $DIR/proc-unsafe-attributes.rs:27:16
|
2024-07-09 19:06:49 -05:00
|
|
|
|
|
|
|
|
|
LL | #[unsafe(allow(unsafe(dead_code)))]
|
|
|
|
|
| ^^^^^^^^^^^^^^^^^ bad attribute argument
|
|
|
|
|
|
|
|
|
|
|
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
|
|
|
|
|
|
2025-07-31 15:38:44 +02:00
|
|
|
error: expected identifier, found keyword `unsafe`
|
|
|
|
|
--> $DIR/proc-unsafe-attributes.rs:12:21
|
|
|
|
|
|
|
|
|
|
|
LL | #[proc_macro_derive(unsafe(Foo))]
|
|
|
|
|
| ^^^^^^ expected identifier, found keyword
|
|
|
|
|
|
|
|
|
|
|
help: escape `unsafe` to use it as an identifier
|
|
|
|
|
|
|
|
|
|
|
LL | #[proc_macro_derive(r#unsafe(Foo))]
|
|
|
|
|
| ++
|
|
|
|
|
|
2025-07-07 20:48:51 +02:00
|
|
|
error[E0565]: malformed `proc_macro_derive` attribute input
|
|
|
|
|
--> $DIR/proc-unsafe-attributes.rs:12:1
|
|
|
|
|
|
|
|
|
|
|
LL | #[proc_macro_derive(unsafe(Foo))]
|
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^-----^^
|
2025-08-11 01:46:34 +00:00
|
|
|
| |
|
|
|
|
|
| didn't expect any arguments here
|
|
|
|
|
|
|
2025-08-11 17:02:32 +00:00
|
|
|
= note: for more information, visit <https://doc.rust-lang.org/reference/procedural-macros.html#derive-macros>
|
2025-08-11 01:46:34 +00:00
|
|
|
help: try changing it to one of the following valid forms of the attribute
|
|
|
|
|
|
|
|
|
|
|
LL - #[proc_macro_derive(unsafe(Foo))]
|
|
|
|
|
LL + #[proc_macro_derive(TraitName)]
|
|
|
|
|
|
|
|
|
|
|
LL - #[proc_macro_derive(unsafe(Foo))]
|
|
|
|
|
LL + #[proc_macro_derive(TraitName, attributes(name1, name2, ...))]
|
|
|
|
|
|
|
2025-07-07 20:48:51 +02:00
|
|
|
|
2024-12-03 00:12:24 +00:00
|
|
|
error[E0452]: malformed lint attribute input
|
2025-07-07 20:48:51 +02:00
|
|
|
--> $DIR/proc-unsafe-attributes.rs:27:16
|
2024-12-03 00:12:24 +00:00
|
|
|
|
|
|
|
|
|
LL | #[unsafe(allow(unsafe(dead_code)))]
|
|
|
|
|
| ^^^^^^^^^^^^^^^^^ bad attribute argument
|
|
|
|
|
|
|
|
|
|
|
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
|
|
|
|
|
|
|
|
|
|
error[E0452]: malformed lint attribute input
|
2025-07-07 20:48:51 +02:00
|
|
|
--> $DIR/proc-unsafe-attributes.rs:27:16
|
2024-12-03 00:12:24 +00:00
|
|
|
|
|
|
|
|
|
LL | #[unsafe(allow(unsafe(dead_code)))]
|
|
|
|
|
| ^^^^^^^^^^^^^^^^^ bad attribute argument
|
|
|
|
|
|
|
|
|
|
|
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
|
|
|
|
|
|
2025-07-07 20:48:51 +02:00
|
|
|
error: aborting due to 18 previous errors
|
2024-07-02 23:52:16 -05:00
|
|
|
|
2025-07-07 20:48:51 +02:00
|
|
|
Some errors have detailed explanations: E0452, E0565.
|
|
|
|
|
For more information about an error, try `rustc --explain E0452`.
|