rust/tests
Matthias Krüger 06b2f6208a
Rollup merge of #136490 - Skepfyr:no-field-rest-pattern-attrs, r=compiler-errors
Do not allow attributes on struct field rest patterns

Fixes #81282.

This removes support for attributes on struct field rest patterns (the `..` bit) from the parser. Previously any attributes were being parsed but dropped from the AST, so didn't work and were deleted by rustfmt.

This needs an equivalent change to the reference but I wanted to see how this PR is received first.
The error message it produces isn't great, however it does match the error you get if you try to add attributes to .. in struct expressions atm, although I can understand wanting to do better given this was previously accepted. I think I could move attribute parsing back up to where it was and then emit a specific new error for this case, however I might need some guidance as this is the first time I've messed around inside the compiler.

While this is technically breaking I don't think it's much of an issue: attributes in this position don't currently do anything and rustfmt outright deletes them, meaning it's incredibly unlikely to affect anyone. I have already made the equivalent change to *add* support for attributes (mostly) but the conversation in the linked issue suggested it would be more reasonable to just remove them (and pointed out it's much easier to add support later if we realise we need them).
2025-02-15 20:14:58 +01:00
..
assembly Rollup merge of #134999 - Berrysoft:dev/new-cygwin-target, r=chenyukang,workingjubilee 2025-02-13 03:53:28 -05:00
auxiliary Implement and use BikeshedGuaranteedNoDrop for union/unsafe field validity 2025-02-13 03:45:04 +00:00
codegen Rollup merge of #137038 - maurer:tolerate-captures, r=nikic 2025-02-14 14:05:28 -08:00
codegen-units Remove -Zinline-in-all-cgus and clean up CGU partitioning tests 2025-01-27 23:48:47 -05:00
coverage coverage: Eliminate more counters by giving them to unreachable nodes 2025-02-13 13:45:53 +11:00
coverage-run-rustdoc coverage: Restrict empty-span expansion to only cover { and } 2024-11-08 20:43:08 +11:00
crashes adjust derive_error 2025-02-13 23:49:09 +01:00
debuginfo Revert "Remove the Arc rt::init allocation for thread info" 2025-01-14 13:37:25 +01:00
incremental tests: error strings for ABI stability now match 2025-02-09 20:45:47 -08:00
mir-opt Rollup merge of #137007 - pvdrz:fix-aarch64-alloc-layout, r=compiler-errors 2025-02-14 16:23:34 +01:00
pretty Update tests to use new proc-macro header 2024-11-27 07:18:25 -08:00
run-make Make -O mean -C opt-level=3 2025-02-13 19:47:55 +00:00
rustdoc Add regression test for source line numbers 2025-02-11 14:29:58 +01:00
rustdoc-gui rustdoc: use better, consistent SVG icons for scraped examples 2025-02-12 16:07:11 -07:00
rustdoc-js Rollup merge of #134277 - notriddle:notriddle/inline-into, r=GuillaumeGomez 2024-12-16 20:00:20 +01:00
rustdoc-js-std Remove the common prelude module 2025-02-11 13:04:27 -08:00
rustdoc-json Add missing lang items in no_core tests in rustdoc 2025-02-04 01:05:31 +00:00
rustdoc-ui Rollup merge of #136927 - GuillaumeGomez:add-missing-hashtag-escape, r=notriddle 2025-02-12 20:10:01 -05:00
ui Rollup merge of #136490 - Skepfyr:no-field-rest-pattern-attrs, r=compiler-errors 2025-02-15 20:14:58 +01:00
ui-fulldeps Rollup merge of #134777 - saethlin:enable-more-tests-on-windows, r=Noratrieb 2025-02-04 05:36:50 -05:00
COMPILER_TESTS.md