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

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

66 lines
1.9 KiB
Plaintext
Raw Normal View History

error: expected identifier, found keyword `unsafe`
2024-08-07 06:36:28 +00:00
--> $DIR/derive-unsafe-attributes.rs:1:10
2024-04-23 12:50:53 +00:00
|
LL | #[derive(unsafe(Debug))]
| ^^^^^^ expected identifier, found keyword
|
help: escape `unsafe` to use it as an identifier
|
LL | #[derive(r#unsafe(Debug))]
| ++
error: traits in `#[derive(...)]` don't accept arguments
2024-08-07 06:36:28 +00:00
--> $DIR/derive-unsafe-attributes.rs:1:16
|
LL | #[derive(unsafe(Debug))]
| ^^^^^^^ help: remove the arguments
2024-04-23 12:50:53 +00:00
2024-07-03 04:52:16 +00:00
error: `derive` is not an unsafe attribute
2024-08-07 06:36:28 +00:00
--> $DIR/derive-unsafe-attributes.rs:10:3
2024-07-03 04:52:16 +00:00
|
LL | #[unsafe(derive(Debug))]
| ^^^^^^ 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`
2024-08-07 06:36:28 +00:00
--> $DIR/derive-unsafe-attributes.rs:1:10
|
LL | #[derive(unsafe(Debug))]
| ^^^^^^ expected identifier, found keyword
|
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
help: escape `unsafe` to use it as an identifier
|
LL | #[derive(r#unsafe(Debug))]
| ++
error: expected identifier, found keyword `unsafe`
2024-08-07 06:36:28 +00:00
--> $DIR/derive-unsafe-attributes.rs:1:10
|
LL | #[derive(unsafe(Debug))]
| ^^^^^^ expected identifier, found keyword
|
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
help: escape `unsafe` to use it as an identifier
|
LL | #[derive(r#unsafe(Debug))]
| ++
error: cannot find derive macro `r#unsafe` in this scope
2024-08-07 06:36:28 +00:00
--> $DIR/derive-unsafe-attributes.rs:1:10
|
LL | #[derive(unsafe(Debug))]
| ^^^^^^
error: cannot find derive macro `r#unsafe` in this scope
2024-08-07 06:36:28 +00:00
--> $DIR/derive-unsafe-attributes.rs:1:10
|
LL | #[derive(unsafe(Debug))]
| ^^^^^^
|
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
error: aborting due to 7 previous errors
2024-04-23 12:50:53 +00:00