rust/compiler/rustc_feature/src
Jacob Pratt 4a1d0cd1bd
Rollup merge of #139718 - folkertdev:unsafe-attributes-earlier-editions, r=fmease
enforce unsafe attributes in pre-2024 editions by default

New unsafe attributes should emit an error when used without the `unsafe(...)` in all editions.

The `no_mangle`, `link_section` and `export_name` attributes are exceptions, and can still be used without an unsafe in earlier editions. The only attributes for which this change is relevant right now are `#[ffi_const]` and `#[ffi_pure]`.

This change is required for making `#[unsafe(naked)]` sound in pre-2024 editions.
2025-04-13 23:57:40 -04:00
..
accepted.rs replace version placeholder 2025-04-09 12:29:59 +01:00
builtin_attrs.rs error on unsafe attributes in pre-2024 editions 2025-04-13 01:22:59 +02:00
lib.rs Remove #![warn(unreachable_pub)] from all compiler/ crates. 2025-03-11 13:14:21 +11:00
removed.rs replace version placeholder 2025-04-09 12:29:59 +01:00
tests.rs rustc_feature: Avoid unsafe std::env::set_var() in UnstableFeatures tests 2025-01-08 11:37:19 +01:00
unstable.rs Rollup merge of #139001 - folkertdev:naked-function-rustic-abi, r=traviscross,compiler-errors 2025-04-13 17:37:52 -04:00