1
1
error: unsafe attribute used without unsafe
2
- --> $DIR/unsafe-attributes-fix.rs:43 :6
2
+ --> $DIR/unsafe-attributes-fix.rs:52 :6
3
3
|
4
4
LL | tt!([no_mangle]);
5
5
| ^^^^^^^^^ usage of unsafe attribute
@@ -34,7 +34,7 @@ LL | #[unsafe($e)]
34
34
| +++++++ +
35
35
36
36
error: unsafe attribute used without unsafe
37
- --> $DIR/unsafe-attributes-fix.rs:47 :7
37
+ --> $DIR/unsafe-attributes-fix.rs:56 :7
38
38
|
39
39
LL | meta!(no_mangle);
40
40
| ^^^^^^^^^ usage of unsafe attribute
@@ -47,7 +47,7 @@ LL | meta!(unsafe(no_mangle));
47
47
| +++++++ +
48
48
49
49
error: unsafe attribute used without unsafe
50
- --> $DIR/unsafe-attributes-fix.rs:50 :8
50
+ --> $DIR/unsafe-attributes-fix.rs:59 :8
51
51
|
52
52
LL | meta2!(export_name = "baw");
53
53
| ^^^^^^^^^^^ usage of unsafe attribute
@@ -77,7 +77,24 @@ LL | #[unsafe($e = $l)]
77
77
| +++++++ +
78
78
79
79
error: unsafe attribute used without unsafe
80
- --> $DIR/unsafe-attributes-fix.rs:55:3
80
+ --> $DIR/unsafe-attributes-fix.rs:45:27
81
+ |
82
+ LL | #[cfg_attr(all(), link_section = ".custom_section")]
83
+ | ^^^^^^^^^^^^ usage of unsafe attribute
84
+ ...
85
+ LL | with_cfg_attr!();
86
+ | ---------------- in this macro invocation
87
+ |
88
+ = warning: this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2024!
89
+ = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2024/unsafe-attributes.html>
90
+ = note: this error originates in the macro `with_cfg_attr` (in Nightly builds, run with -Z macro-backtrace for more info)
91
+ help: wrap the attribute in `unsafe(...)`
92
+ |
93
+ LL | #[cfg_attr(all(), unsafe(link_section = ".custom_section"))]
94
+ | +++++++ +
95
+
96
+ error: unsafe attribute used without unsafe
97
+ --> $DIR/unsafe-attributes-fix.rs:66:3
81
98
|
82
99
LL | #[no_mangle]
83
100
| ^^^^^^^^^ usage of unsafe attribute
@@ -89,5 +106,5 @@ help: wrap the attribute in `unsafe(...)`
89
106
LL | #[unsafe(no_mangle)]
90
107
| +++++++ +
91
108
92
- error: aborting due to 6 previous errors
109
+ error: aborting due to 7 previous errors
93
110
0 commit comments