rust/compiler/rustc_attr_parsing
Matthias Krüger 2dbb9be326
Rollup merge of #142964 - GrigorenkoPV:attributes/argless, r=oli-obk
Attribute rework: a parser for single attributes without arguments

Part of rust-lang/rust#131229

r? `@jdonszelmann`

I think code (with comments) speaks for itself.

The only subtlety: now `#[cold]`, `#[no_mangle]`, & `#[track_caller]` do not get thrown away when malformed (i.e. have arguments). This doesn't matter too much (I think), because an error gets emitted either way, so the compilation will not finish.
2025-07-02 19:29:36 +02:00
..