rust/compiler/rustc_parse/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
..
lexer Replace rustc_lexer/unescape with rustc-literal-escaper crate 2025-04-04 14:44:45 +02:00
parser Rollup merge of #139653 - nnethercote:fix-139495, r=petrochenkov 2025-04-11 21:21:01 +02:00
errors.rs Remove NtExpr and NtLiteral. 2025-04-02 06:20:35 +11:00
lib.rs Auto merge of #138414 - matthiaskrgr:rollup-9ablqdb, r=matthiaskrgr 2025-03-12 17:27:43 +00:00
validate_attr.rs error on unsafe attributes in pre-2024 editions 2025-04-13 01:22:59 +02:00