Files
rust/tests
Jonathan Brouwer 45cec8bb3e Rollup merge of #153532 - jdonszelmann:attributes-containing-rustc, r=petrochenkov
Attributes containing rustc

r? @petrochenkov

I noticed that attributes *containing* the word rustc as a segment also error with a message referring to "starting with rustc". The first commit shows this going wrong by re-exporting `#[test]`, a built-in macro, from a module called rustc.

The 2nd commit addresses this by changing the diagnostic. However, given the wording I wonder if the real solution shouldn't be to allow attributes containing a `rustc` segment and only disallow them when they start. In other words, actually implement the behavior that the original diagnostic pointed out.
2026-04-02 22:13:48 +02:00
..