rust/compiler/rustc_builtin_macros
Matthias Krüger 0c95abb979
Rollup merge of #149524 - JonathanBrouwer:move_attr_safety, r=jdonszelmann
Move attribute safety checking to attribute parsing

This PR moves attribute safety checking to be done during attribute parsing. The `cfg` and `cfg_attr` attribute no longer need special-cased safety checking, yay!

This PR is a part 1 of 2, in the second part I'd like to define attribute safety in the attribute parsers rather than getting the information from BUILTIN_ATTRIBUTE_MAP, but to keep PRs reviewable lets do that separately.

Fixes https://github.com/rust-lang/rust/issues/148453 by reordering the diagnostics. The "cannot find attribute" diagnostic now appears first, but both diagnostics still appear.

r? `@jdonszelmann`
2025-12-04 16:07:53 +01:00
..
src Rollup merge of #149524 - JonathanBrouwer:move_attr_safety, r=jdonszelmann 2025-12-04 16:07:53 +01:00
Cargo.toml Make llvm_enzyme a regular cargo feature 2025-09-15 15:31:56 +00:00
messages.ftl Rollup merge of #147736 - folkertdev:stabilize-asm-cfg, r=jdonszelmann 2025-11-25 17:51:13 +01:00