rust/tests/ui/attributes/unsafe/proc-unsafe-attributes.stderr

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

120 lines
3.8 KiB
Plaintext
Raw Normal View History

error[E0452]: malformed lint attribute input
--> $DIR/proc-unsafe-attributes.rs:28:16
|
LL | #[unsafe(allow(unsafe(dead_code)))]
| ^^^^^^^^^^^^^^^^^ bad attribute argument
error[E0452]: malformed lint attribute input
--> $DIR/proc-unsafe-attributes.rs:28:16
|
LL | #[unsafe(allow(unsafe(dead_code)))]
| ^^^^^^^^^^^^^^^^^ bad attribute argument
|
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
2024-07-03 04:52:16 +00:00
error: `proc_macro` is not an unsafe attribute
--> $DIR/proc-unsafe-attributes.rs:3:3
|
LL | #[unsafe(proc_macro)]
| ^^^^^^ this is not an unsafe attribute
2024-07-03 04:52:16 +00:00
|
= note: extraneous unsafe is not allowed in attributes
error: `proc_macro_derive` is not an unsafe attribute
--> $DIR/proc-unsafe-attributes.rs:9:3
|
LL | #[unsafe(proc_macro_derive(Foo))]
| ^^^^^^ this is not an unsafe attribute
2024-07-03 04:52:16 +00:00
|
= note: extraneous unsafe is not allowed in attributes
error: expected identifier, found keyword `unsafe`
--> $DIR/proc-unsafe-attributes.rs:14: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))]
| ++
2024-07-03 04:52:16 +00:00
error: `proc_macro_attribute` is not an unsafe attribute
--> $DIR/proc-unsafe-attributes.rs:19:3
2024-07-03 04:52:16 +00:00
|
LL | #[unsafe(proc_macro_attribute)]
| ^^^^^^ this is not an unsafe attribute
2024-07-03 04:52:16 +00:00
|
= note: extraneous unsafe is not allowed in attributes
error: `allow` is not an unsafe attribute
--> $DIR/proc-unsafe-attributes.rs:24:3
2024-07-03 04:52:16 +00:00
|
LL | #[unsafe(allow(dead_code))]
| ^^^^^^ this is not an unsafe attribute
2024-07-03 04:52:16 +00:00
|
= note: extraneous unsafe is not allowed in attributes
error: `allow` is not an unsafe attribute
--> $DIR/proc-unsafe-attributes.rs:28:3
|
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`
--> $DIR/proc-unsafe-attributes.rs:28:16
|
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-03 04:52:16 +00:00
error: the `#[proc_macro]` attribute is only usable with crates of the `proc-macro` crate type
--> $DIR/proc-unsafe-attributes.rs:3:1
|
LL | #[unsafe(proc_macro)]
| ^^^^^^^^^^^^^^^^^^^^^
error: the `#[proc_macro_derive]` attribute is only usable with crates of the `proc-macro` crate type
--> $DIR/proc-unsafe-attributes.rs:9:1
|
LL | #[unsafe(proc_macro_derive(Foo))]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error: the `#[proc_macro_derive]` attribute is only usable with crates of the `proc-macro` crate type
--> $DIR/proc-unsafe-attributes.rs:14:1
|
LL | #[proc_macro_derive(unsafe(Foo))]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error: the `#[proc_macro_attribute]` attribute is only usable with crates of the `proc-macro` crate type
--> $DIR/proc-unsafe-attributes.rs:19:1
2024-07-03 04:52:16 +00:00
|
LL | #[unsafe(proc_macro_attribute)]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error[E0452]: malformed lint attribute input
--> $DIR/proc-unsafe-attributes.rs:28:16
|
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
--> $DIR/proc-unsafe-attributes.rs:28:16
|
LL | #[unsafe(allow(unsafe(dead_code)))]
| ^^^^^^^^^^^^^^^^^ bad attribute argument
|
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
error: aborting due to 15 previous errors
2024-07-03 04:52:16 +00:00
For more information about this error, try `rustc --explain E0452`.