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
..
2024-12-08 15:32:04 +08:00
2025-02-03 14:04:57 +00:00
2025-02-14 00:27:13 -08:00
2024-12-13 07:10:20 +11:00
2025-02-14 00:44:10 -08:00
2024-10-28 14:20:28 +11:00
2024-07-18 20:08:38 +00:00
2025-02-14 00:44:10 -08:00
2024-12-21 03:02:07 +00:00
2025-02-14 00:44:10 -08:00
2025-02-10 20:21:39 +00:00
2024-10-30 16:47:47 -07:00
2024-02-16 20:02:50 +00:00
2024-02-16 20:02:50 +00:00
2024-12-10 11:34:13 +08:00
2024-12-17 19:09:00 +08:00
2024-12-17 19:09:00 +08:00
2024-02-16 20:02:50 +00:00
2024-07-18 19:23:42 +00:00
2025-02-14 00:44:10 -08:00
2025-02-10 20:21:39 +00:00
2025-02-14 00:44:10 -08:00
2025-01-27 17:17:22 +00:00
2025-01-07 16:04:14 +01:00
2025-01-27 17:17:22 +00:00
2024-11-16 20:03:31 +00:00
2023-11-24 19:15:52 +01:00
2024-07-07 17:11:04 +02:00
2025-02-10 20:21:39 +00:00
2025-01-07 16:04:14 +01:00
2025-02-11 19:42:47 -08:00
2023-11-24 19:15:52 +01:00
2024-09-18 20:37:56 +02:00
2024-12-11 16:23:04 +01:00
2023-11-24 19:15:52 +01:00
2024-12-02 16:50:44 +00:00
2024-12-02 16:50:44 +00:00
2024-02-16 20:02:50 +00:00
2023-11-24 19:15:52 +01:00
2023-11-24 19:15:52 +01:00
2023-11-24 19:15:52 +01:00
2024-02-16 20:02:50 +00:00
2024-03-01 02:03:00 +00:00
2023-11-24 19:15:52 +01:00
2024-09-22 23:29:25 +03:00
2024-11-16 20:03:31 +00:00
2023-11-24 19:15:52 +01:00
2023-11-24 19:15:52 +01:00
2023-11-24 19:15:52 +01:00
2023-11-24 19:15:52 +01:00
2023-11-24 19:15:52 +01:00
2023-11-24 19:15:52 +01:00
2024-02-16 20:02:50 +00:00
2023-11-24 19:15:52 +01:00
2024-11-29 06:10:15 +11:00
2024-07-11 00:00:03 -04:00
2024-12-13 07:10:20 +11:00
2024-12-13 07:10:20 +11:00
2023-10-09 22:48:10 +00:00
2024-05-22 19:47:32 +08:00
2024-02-16 20:02:50 +00:00
2024-02-16 20:02:50 +00:00
2023-10-09 19:24:05 +00:00
2025-02-14 00:44:10 -08:00
2025-02-10 20:21:39 +00:00
2023-11-24 19:15:52 +01:00
2024-07-16 12:06:25 -04:00
2024-07-16 12:06:25 -04:00
2024-02-16 20:02:50 +00:00
2024-02-16 20:02:50 +00:00
2024-12-10 18:17:24 +00:00
2024-02-16 20:02:50 +00:00
2023-11-24 19:15:52 +01:00
2024-11-16 20:03:31 +00:00
2023-11-24 19:15:52 +01:00
2025-01-24 01:19:50 +00:00
2025-02-10 20:21:39 +00:00
2024-03-08 20:56:25 +00:00
2023-10-25 19:07:34 +00:00
2023-11-24 19:15:52 +01:00
2025-02-10 20:21:39 +00:00
2024-04-12 12:59:40 +09:00
2023-11-11 16:00:13 +01:00
2023-11-11 16:00:13 +01:00
2024-07-18 20:08:38 +00:00
2024-03-12 21:32:21 +01:00
2024-03-12 21:32:21 +01:00
2025-02-10 20:21:39 +00:00
2023-11-24 19:15:52 +01:00
2023-11-24 19:15:52 +01:00
2023-11-24 19:15:52 +01:00
2023-11-24 19:15:52 +01:00
2023-11-24 19:15:52 +01:00
2023-11-24 19:15:52 +01:00
2023-11-24 19:15:52 +01:00
2023-11-24 19:15:52 +01:00
2023-11-24 19:15:52 +01:00
2023-11-24 19:15:52 +01:00
2023-11-24 19:15:52 +01:00
2023-11-24 19:15:52 +01:00
2024-07-12 03:02:57 +00:00
2024-02-16 20:02:50 +00:00
2024-02-16 20:02:50 +00:00
2023-10-20 02:54:45 +00:00
2023-11-24 19:15:52 +01:00
2025-02-10 20:21:39 +00:00
2023-11-24 19:15:52 +01:00
2024-06-04 14:19:42 -03:00
2024-06-04 14:19:42 -03:00
2025-02-10 20:21:39 +00:00
2025-01-24 01:19:50 +00:00
2025-01-24 01:19:50 +00:00
2024-05-11 15:49:51 -07:00
2024-11-16 20:03:31 +00:00
2025-02-10 20:21:39 +00:00
2023-11-24 19:15:52 +01:00
2024-02-16 20:02:50 +00:00
2024-02-16 20:02:50 +00:00
2025-02-10 20:21:39 +00:00
2024-02-16 20:02:50 +00:00
2024-02-16 20:02:50 +00:00
2024-04-22 17:47:35 +02:00
2024-04-22 17:47:35 +02:00
2025-02-10 20:21:39 +00:00
2024-02-16 20:02:50 +00:00
2024-02-16 20:02:50 +00:00
2024-02-16 20:02:50 +00:00
2024-02-16 20:02:50 +00:00
2024-02-16 20:02:50 +00:00
2025-02-10 20:21:39 +00:00
2023-11-24 19:15:52 +01:00
2023-11-24 19:15:52 +01:00
2024-07-08 10:04:03 +04:00
2025-02-14 00:44:10 -08:00
2023-11-16 16:19:04 +00:00
2023-11-16 16:19:04 +00:00
2024-02-28 20:59:32 +11:00
2024-02-28 20:59:32 +11:00
2024-02-16 20:02:50 +00:00
2024-12-12 23:36:27 +00:00
2025-02-10 20:21:39 +00:00
2025-01-04 11:41:51 +01:00
2025-01-04 11:41:51 +01:00
2024-02-16 20:02:50 +00:00
2025-02-10 20:21:39 +00:00
2024-02-16 20:02:50 +00:00
2023-11-24 19:15:52 +01:00
2024-02-16 20:02:50 +00:00
2023-11-24 19:15:52 +01:00
2024-02-16 20:02:50 +00:00
2023-11-24 19:15:52 +01:00
2024-02-16 20:02:50 +00:00
2023-11-24 19:15:52 +01:00
2024-10-11 11:30:08 -04:00
2024-10-11 11:30:08 -04:00
2024-02-16 20:02:50 +00:00
2024-02-16 20:02:50 +00:00
2025-02-10 20:21:39 +00:00
2025-02-10 20:21:39 +00:00
2024-02-16 20:02:50 +00:00
2024-02-16 20:02:50 +00:00
2024-02-16 20:02:50 +00:00
2023-11-24 19:15:52 +01:00
2024-03-07 23:03:42 +00:00
2024-11-22 11:12:15 -08:00
2024-07-11 12:12:00 +04:00
2024-07-11 12:12:00 +04:00
2024-07-12 03:02:57 +00:00
2024-02-16 20:02:50 +00:00
2024-02-16 20:02:50 +00:00
2024-02-16 20:02:50 +00:00
2024-07-12 03:02:57 +00:00
2024-02-16 20:02:50 +00:00
2023-11-24 19:15:52 +01:00
2024-02-16 20:02:50 +00:00
2023-11-24 19:15:52 +01:00
2024-02-16 20:02:50 +00:00
2024-02-14 21:04:51 +00:00
2024-03-18 16:08:58 +00:00
2023-11-24 19:15:52 +01:00
2024-07-12 03:02:57 +00:00
2024-11-29 06:10:15 +11:00
2024-03-05 00:12:15 +01:00
2024-03-05 00:12:15 +01:00
2024-11-03 18:59:31 +00:00
2024-02-16 20:02:50 +00:00
2023-11-24 19:15:52 +01:00
2024-02-16 20:02:50 +00:00
2023-11-24 19:15:52 +01:00
2024-02-16 20:02:50 +00:00
2023-11-24 19:15:52 +01:00
2024-02-16 20:02:50 +00:00
2023-11-24 19:15:52 +01:00
2024-02-16 20:02:50 +00:00
2024-02-16 20:02:50 +00:00
2025-02-10 20:21:39 +00:00
2024-02-16 20:02:50 +00:00
2024-02-16 20:02:50 +00:00
2025-02-10 20:21:39 +00:00
2024-08-04 00:11:16 +08:00
2024-02-16 20:02:50 +00:00
2024-08-04 00:11:16 +08:00
2023-11-24 19:15:52 +01:00
2023-11-24 19:15:52 +01:00
2024-02-16 20:02:50 +00:00
2024-02-16 20:02:50 +00:00
2025-02-10 20:21:39 +00:00
2023-11-24 19:15:52 +01:00
2024-04-21 15:43:43 -03:00
2024-04-21 15:43:43 -03:00
2024-04-21 15:43:43 -03:00
2024-04-21 15:43:43 -03:00
2023-10-28 08:53:51 +08:00
2023-10-28 08:53:51 +08:00
2024-07-12 03:02:57 +00:00
2024-02-16 20:02:50 +00:00
2024-07-12 03:02:57 +00:00
2024-02-16 20:02:50 +00:00
2024-02-01 16:18:03 +01:00
2024-02-01 16:18:03 +01:00
2024-02-16 20:02:50 +00:00
2025-01-07 16:04:14 +01:00
2025-01-07 16:04:14 +01:00
2025-02-10 20:21:39 +00:00
2023-11-24 19:15:52 +01:00
2023-11-24 19:15:52 +01:00
2023-11-24 19:15:52 +01:00
2023-11-24 19:15:52 +01:00
2023-11-24 19:15:52 +01:00
2023-11-24 19:15:52 +01:00
2023-11-24 19:15:52 +01:00
2023-11-24 19:15:52 +01:00
2023-11-24 19:15:52 +01:00
2023-11-24 19:15:52 +01:00
2023-11-24 19:15:52 +01:00
2023-11-24 19:15:52 +01:00
2023-11-24 19:15:52 +01:00
2023-11-24 19:15:52 +01:00
2023-11-24 19:15:52 +01:00
2023-11-24 19:15:52 +01:00
2023-11-24 19:15:52 +01:00
2023-11-24 19:15:52 +01:00
2023-11-24 19:15:52 +01:00
2023-11-24 19:15:52 +01:00
2023-11-24 19:15:52 +01:00
2023-11-24 19:15:52 +01:00
2023-11-24 19:15:52 +01:00
2023-11-24 19:15:52 +01:00
2023-11-24 19:15:52 +01:00
2023-11-24 19:15:52 +01:00
2024-02-16 20:02:50 +00:00
2023-11-24 19:15:52 +01:00
2023-11-24 19:15:52 +01:00
2023-11-24 19:15:52 +01:00
2024-02-16 20:02:50 +00:00
2023-11-24 19:15:52 +01:00
2023-11-24 19:15:52 +01:00
2023-11-24 19:15:52 +01:00
2023-11-24 19:15:52 +01:00
2023-11-24 19:15:52 +01:00
2024-02-16 20:02:50 +00:00
2025-02-10 20:21:39 +00:00
2024-11-16 20:03:31 +00:00
2024-05-18 18:12:18 +02:00
2024-01-29 11:25:09 +11:00
2024-07-12 03:02:57 +00:00
2024-02-16 20:02:50 +00:00
2024-02-16 20:02:50 +00:00
2024-07-12 03:02:57 +00:00
2024-07-12 03:02:57 +00:00
2025-02-10 20:21:39 +00:00
2024-02-16 20:02:50 +00:00
2024-02-16 20:02:50 +00:00
2025-02-10 20:21:39 +00:00
2025-01-07 16:04:14 +01:00
2025-02-11 19:42:47 -08:00
2023-11-24 19:15:52 +01:00
2024-02-16 20:02:50 +00:00
2023-11-24 19:15:52 +01:00
2023-11-24 19:15:52 +01:00
2025-02-10 20:21:39 +00:00
2024-07-12 03:22:32 +00:00
2023-12-12 14:42:04 +01:00
2025-02-10 20:21:39 +00:00
2025-02-10 20:21:39 +00:00
2023-11-24 19:15:52 +01:00
2024-02-16 20:02:50 +00:00
2024-02-16 20:02:50 +00:00
2023-11-24 19:15:52 +01:00
2024-02-16 20:02:50 +00:00
2023-11-24 19:15:52 +01:00
2023-11-24 19:15:52 +01:00
2023-11-24 19:15:52 +01:00
2024-07-25 17:01:32 +08:00
2024-07-25 17:01:32 +08:00
2024-02-16 20:02:50 +00:00
2023-11-24 19:15:52 +01:00
2024-03-01 02:03:00 +00:00
2023-11-24 19:15:52 +01:00
2024-07-08 10:04:03 +04:00
2024-07-08 10:04:03 +04:00
2024-07-08 10:04:03 +04:00
2024-07-08 10:04:03 +04:00
2023-11-24 19:15:52 +01:00
2024-07-08 10:04:03 +04:00
2024-07-08 10:04:03 +04:00
2024-07-08 10:04:03 +04:00
2025-02-14 00:44:10 -08:00
2024-07-08 10:04:03 +04:00
2024-07-08 10:04:03 +04:00
2024-07-08 10:04:03 +04:00
2024-07-08 10:04:03 +04:00
2023-11-24 19:15:52 +01:00
2024-07-08 10:04:03 +04:00
2024-07-08 10:04:03 +04:00
2024-02-16 20:02:50 +00:00
2024-02-16 20:02:50 +00:00
2023-11-24 19:15:52 +01:00
2025-01-24 01:19:50 +00:00
2025-01-24 01:19:50 +00:00
2025-02-03 10:39:32 -05:00
2025-02-03 10:39:32 -05:00
2025-01-22 00:52:27 +00:00
2025-01-22 00:52:27 +00:00
2023-11-24 19:15:52 +01:00
2023-11-24 19:15:52 +01:00
2024-11-28 01:37:01 +00:00
2025-02-10 20:21:39 +00:00
2023-11-24 19:15:52 +01:00
2024-03-01 02:03:00 +00:00
2023-11-24 19:15:52 +01:00
2023-11-24 19:15:52 +01:00
2023-11-24 19:15:52 +01:00
2024-10-11 11:30:08 -04:00
2024-10-11 11:30:08 -04:00
2025-02-10 20:21:39 +00:00
2023-11-24 19:15:52 +01:00
2023-11-24 19:15:52 +01:00
2024-02-16 20:02:50 +00:00
2023-11-24 19:15:52 +01:00
2024-11-26 02:50:48 +08:00
2024-02-16 20:02:50 +00:00
2024-03-22 17:25:57 +01:00
2024-07-18 20:08:38 +00:00
2024-07-18 20:08:38 +00:00
2023-11-24 19:15:52 +01:00
2024-02-16 20:02:50 +00:00
2023-12-28 15:02:17 +01:00
2023-12-28 15:02:17 +01:00
2023-11-24 19:15:52 +01:00
2023-11-24 19:15:52 +01:00
2023-11-24 19:15:52 +01:00
2024-01-28 16:12:21 +01:00
2024-11-23 08:57:25 -07:00
2024-01-28 16:12:21 +01:00
2024-11-23 08:57:25 -07:00
2024-11-24 19:42:33 +01:00
2024-11-24 19:42:33 +01:00
2023-11-24 19:15:52 +01:00
2023-11-24 19:15:52 +01:00
2024-01-28 16:12:21 +01:00
2024-11-23 08:57:25 -07:00
2023-11-24 19:15:52 +01:00
2023-11-24 19:15:52 +01:00
2024-02-16 20:02:50 +00:00
2023-11-24 19:15:52 +01:00
2024-07-12 03:02:57 +00:00
2024-02-16 20:02:50 +00:00
2024-02-16 20:02:50 +00:00
2025-02-10 20:21:39 +00:00
2023-11-24 19:15:52 +01:00
2024-02-16 20:02:50 +00:00
2024-02-16 20:02:50 +00:00
2025-02-10 20:21:39 +00:00
2024-02-16 20:02:50 +00:00
2024-02-16 20:02:50 +00:00
2025-02-10 20:21:39 +00:00
2024-02-16 20:02:50 +00:00
2024-02-16 20:02:50 +00:00
2023-11-24 19:15:52 +01:00
2025-02-10 20:21:39 +00:00
2024-02-16 20:02:50 +00:00
2024-02-16 20:02:50 +00:00
2024-07-12 03:02:57 +00:00
2023-11-24 19:15:52 +01:00
2023-11-24 19:15:52 +01:00
2024-01-08 16:06:37 -08:00
2024-01-08 16:06:37 -08:00
2025-02-10 20:21:39 +00:00
2024-02-16 20:02:50 +00:00
2023-12-04 10:40:09 -08:00
2023-12-04 10:40:09 -08:00
2023-11-24 19:15:52 +01:00
2024-07-12 03:02:57 +00:00
2024-07-16 12:06:25 -04:00
2024-07-16 12:06:25 -04:00
2023-11-24 19:15:52 +01:00
2024-02-16 20:02:50 +00:00
2024-02-16 20:02:50 +00:00
2023-11-09 00:31:42 -08:00
2023-11-09 00:31:42 -08:00
2024-07-18 20:08:38 +00:00
2023-11-24 19:15:52 +01:00
2024-02-16 20:02:50 +00:00
2024-02-16 20:02:50 +00:00
2024-02-16 20:02:50 +00:00
2024-12-09 21:55:13 +00:00
2024-12-09 21:55:13 +00:00
2024-02-16 20:02:50 +00:00
2024-02-16 20:02:50 +00:00
2023-11-24 19:15:52 +01:00
2024-10-29 16:26:57 +00:00
2023-11-24 19:15:52 +01:00
2024-02-16 20:02:50 +00:00
2024-07-18 18:20:35 +00:00
2024-02-16 20:02:50 +00:00
2024-02-16 20:02:50 +00:00
2025-02-10 20:21:39 +00:00
2024-11-17 22:30:11 +00:00
2024-08-09 05:52:53 +00:00
2025-02-10 20:21:39 +00:00
2024-02-16 20:02:50 +00:00
2024-02-16 20:02:50 +00:00
2024-02-07 10:42:01 +08:00
2023-11-24 19:15:52 +01:00
2024-02-16 20:02:50 +00:00
2024-02-16 20:02:50 +00:00
2023-11-24 19:15:52 +01:00
2024-11-17 22:30:11 +00:00
2024-11-17 22:30:11 +00:00
2024-05-20 19:55:59 -07:00
2024-03-18 21:35:18 -07:00
2023-10-26 23:04:20 +00:00
2023-10-26 23:04:20 +00:00
2024-07-18 19:23:42 +00:00
2024-02-16 20:02:50 +00:00
2023-11-24 19:15:52 +01:00
2024-02-16 20:02:50 +00:00
2024-02-16 20:02:50 +00:00
2025-02-10 20:21:39 +00:00
2023-11-24 19:15:52 +01:00
2024-02-16 20:02:50 +00:00
2024-06-17 22:35:25 -04:00
2024-07-12 03:02:57 +00:00
2024-07-12 03:02:57 +00:00
2024-07-12 03:02:57 +00:00
2024-07-12 03:02:57 +00:00
2024-09-25 13:26:48 +02:00
2024-02-16 20:02:50 +00:00
2024-04-12 12:59:40 +09:00
2024-04-12 12:59:40 +09:00
2024-04-12 12:59:40 +09:00
2024-09-21 20:29:22 +03:00
2024-09-21 20:29:22 +03:00
2024-09-21 20:29:22 +03:00
2024-09-21 20:07:52 +03:00
2024-09-21 20:07:52 +03:00
2024-09-21 20:07:52 +03:00
2024-02-16 20:02:50 +00:00
2025-02-14 00:27:17 -08:00
2024-12-04 19:52:53 +00:00
2024-12-04 19:52:53 +00:00
2025-02-10 20:21:39 +00:00
2024-02-16 20:02:50 +00:00
2024-07-18 20:08:38 +00:00
2023-11-24 19:15:52 +01:00
2024-07-18 20:08:38 +00:00
2023-11-24 19:15:52 +01:00
2024-03-17 23:35:18 +00:00
2024-03-17 23:35:18 +00:00
2025-02-10 20:21:39 +00:00
2025-02-10 20:21:39 +00:00
2024-12-31 05:03:22 +00:00
2025-02-10 20:21:39 +00:00
2025-02-10 20:21:39 +00:00
2024-07-18 20:08:38 +00:00
2024-07-12 03:02:57 +00:00
2023-11-24 19:15:52 +01:00
2024-11-15 17:43:29 +00:00
2024-11-15 17:43:29 +00:00
2025-02-10 20:21:39 +00:00
2024-07-23 00:29:39 -03:00
2024-07-23 00:29:39 -03:00
2024-07-23 00:29:39 -03:00
2023-10-21 15:56:01 +00:00
2023-11-24 19:15:52 +01:00
2023-11-24 19:15:52 +01:00
2025-02-14 00:44:10 -08:00
2023-11-24 19:15:52 +01:00
2024-02-16 20:02:50 +00:00
2024-07-18 20:08:38 +00:00
2024-02-16 20:02:50 +00:00
2024-10-30 16:47:47 -07:00
2025-02-10 20:21:39 +00:00
2024-10-30 16:47:47 -07:00
2025-02-10 20:21:39 +00:00
2024-06-01 20:57:15 +02:00
2024-06-01 20:57:15 +02:00
2024-06-22 23:30:31 -07:00
2024-06-22 23:30:31 -07:00
2024-02-16 20:02:50 +00:00
2023-11-24 19:15:52 +01:00
2023-11-24 19:15:52 +01:00
2023-11-24 19:15:52 +01:00