1
+ error[E0452]: malformed lint attribute input
2
+ --> $DIR/proc-unsafe-attributes.rs:28:16
3
+ |
4
+ LL | #[unsafe(allow(unsafe(dead_code)))]
5
+ | ^^^^^^^^^^^^^^^^^ bad attribute argument
6
+
7
+ error[E0452]: malformed lint attribute input
8
+ --> $DIR/proc-unsafe-attributes.rs:28:16
9
+ |
10
+ LL | #[unsafe(allow(unsafe(dead_code)))]
11
+ | ^^^^^^^^^^^^^^^^^ bad attribute argument
12
+ |
13
+ = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
14
+
1
15
error: `proc_macro` is not an unsafe attribute
2
16
--> $DIR/proc-unsafe-attributes.rs:3:3
3
17
|
@@ -14,22 +28,52 @@ LL | #[unsafe(proc_macro_derive(Foo))]
14
28
|
15
29
= note: extraneous unsafe is not allowed in attributes
16
30
31
+ error: expected identifier, found keyword `unsafe`
32
+ --> $DIR/proc-unsafe-attributes.rs:14:21
33
+ |
34
+ LL | #[proc_macro_derive(unsafe(Foo))]
35
+ | ^^^^^^ expected identifier, found keyword
36
+ |
37
+ help: escape `unsafe` to use it as an identifier
38
+ |
39
+ LL | #[proc_macro_derive(r#unsafe(Foo))]
40
+ | ++
41
+
17
42
error: `proc_macro_attribute` is not an unsafe attribute
18
- --> $DIR/proc-unsafe-attributes.rs:18 :3
43
+ --> $DIR/proc-unsafe-attributes.rs:19 :3
19
44
|
20
45
LL | #[unsafe(proc_macro_attribute)]
21
46
| ^^^^^^
22
47
|
23
48
= note: extraneous unsafe is not allowed in attributes
24
49
25
50
error: `allow` is not an unsafe attribute
26
- --> $DIR/proc-unsafe-attributes.rs:23 :3
51
+ --> $DIR/proc-unsafe-attributes.rs:24 :3
27
52
|
28
53
LL | #[unsafe(allow(dead_code))]
29
54
| ^^^^^^
30
55
|
31
56
= note: extraneous unsafe is not allowed in attributes
32
57
58
+ error: `allow` is not an unsafe attribute
59
+ --> $DIR/proc-unsafe-attributes.rs:28:3
60
+ |
61
+ LL | #[unsafe(allow(unsafe(dead_code)))]
62
+ | ^^^^^^
63
+ |
64
+ = note: extraneous unsafe is not allowed in attributes
65
+
66
+ error: expected identifier, found keyword `unsafe`
67
+ --> $DIR/proc-unsafe-attributes.rs:28:16
68
+ |
69
+ LL | #[unsafe(allow(unsafe(dead_code)))]
70
+ | ^^^^^^ expected identifier, found keyword
71
+ |
72
+ help: escape `unsafe` to use it as an identifier
73
+ |
74
+ LL | #[unsafe(allow(r#unsafe(dead_code)))]
75
+ | ++
76
+
33
77
error: the `#[proc_macro]` attribute is only usable with crates of the `proc-macro` crate type
34
78
--> $DIR/proc-unsafe-attributes.rs:3:1
35
79
|
@@ -49,10 +93,27 @@ LL | #[proc_macro_derive(unsafe(Foo))]
49
93
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
50
94
51
95
error: the `#[proc_macro_attribute]` attribute is only usable with crates of the `proc-macro` crate type
52
- --> $DIR/proc-unsafe-attributes.rs:18 :1
96
+ --> $DIR/proc-unsafe-attributes.rs:19 :1
53
97
|
54
98
LL | #[unsafe(proc_macro_attribute)]
55
99
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
56
100
57
- error: aborting due to 8 previous errors
101
+ error[E0452]: malformed lint attribute input
102
+ --> $DIR/proc-unsafe-attributes.rs:28:16
103
+ |
104
+ LL | #[unsafe(allow(unsafe(dead_code)))]
105
+ | ^^^^^^^^^^^^^^^^^ bad attribute argument
106
+ |
107
+ = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
108
+
109
+ error[E0452]: malformed lint attribute input
110
+ --> $DIR/proc-unsafe-attributes.rs:28:16
111
+ |
112
+ LL | #[unsafe(allow(unsafe(dead_code)))]
113
+ | ^^^^^^^^^^^^^^^^^ bad attribute argument
114
+ |
115
+ = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
116
+
117
+ error: aborting due to 15 previous errors
58
118
119
+ For more information about this error, try `rustc --explain E0452`.
0 commit comments