11error: unsafe attribute used without unsafe
2- --> $DIR/unsafe-attributes-fix.rs:43 :6
2+ --> $DIR/unsafe-attributes-fix.rs:52 :6
33 |
44LL | tt!([no_mangle]);
55 | ^^^^^^^^^ usage of unsafe attribute
@@ -34,7 +34,7 @@ LL | #[unsafe($e)]
3434 | +++++++ +
3535
3636error: unsafe attribute used without unsafe
37- --> $DIR/unsafe-attributes-fix.rs:47 :7
37+ --> $DIR/unsafe-attributes-fix.rs:56 :7
3838 |
3939LL | meta!(no_mangle);
4040 | ^^^^^^^^^ usage of unsafe attribute
@@ -47,7 +47,7 @@ LL | meta!(unsafe(no_mangle));
4747 | +++++++ +
4848
4949error: unsafe attribute used without unsafe
50- --> $DIR/unsafe-attributes-fix.rs:50 :8
50+ --> $DIR/unsafe-attributes-fix.rs:59 :8
5151 |
5252LL | meta2!(export_name = "baw");
5353 | ^^^^^^^^^^^ usage of unsafe attribute
@@ -77,7 +77,24 @@ LL | #[unsafe($e = $l)]
7777 | +++++++ +
7878
7979error: 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
8198 |
8299LL | #[no_mangle]
83100 | ^^^^^^^^^ usage of unsafe attribute
@@ -89,5 +106,5 @@ help: wrap the attribute in `unsafe(...)`
89106LL | #[unsafe(no_mangle)]
90107 | +++++++ +
91108
92- error: aborting due to 6 previous errors
109+ error: aborting due to 7 previous errors
93110
0 commit comments