Matthias Krüger
bf49dfc943
Rollup merge of #139392 - compiler-errors:raw-expr, r=oli-obk
...
Detect and provide suggestion for `&raw EXPR`
When emitting an error in the parser, and we detect that the previous token was `raw` and we *could* have consumed `const`/`mut`, suggest that this may have been a mistyped raw ref expr. To do this, we add `const`/`mut` to the expected token set when parsing `&raw` as an expression (which does not affect the "good path" of parsing, for the record).
This is kind of a rudimentary error improvement, since it doesn't actually attempt to recover anything, leading to some other knock-on errors b/c we still treat `&raw` as the expression that was parsed... but at least we add the suggestion! I don't think the parser grammar means we can faithfully recover `&raw EXPR` early, i.e. during `parse_expr_borrow`.
Fixes #133231
2025-04-14 18:15:31 +02:00
..
2025-04-03 11:08:55 +03:00
2025-02-14 00:27:13 -08:00
2025-04-08 23:06:31 +03:00
2025-04-09 02:19:37 +00:00
2025-04-08 23:06:31 +03:00
2025-03-06 17:58:32 -03:00
2025-04-08 23:06:31 +03:00
2025-04-14 18:15:31 +02:00
2025-02-10 20:21:39 +00:00
2025-04-08 23:06:31 +03:00
2024-12-17 19:09:00 +08:00
2024-12-17 19:09:00 +08: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
2025-02-10 20:21:39 +00:00
2025-01-07 16:04:14 +01:00
2025-02-11 19:42:47 -08:00
2025-03-06 17:58:32 -03:00
2025-03-06 17:58:32 -03:00
2025-03-01 22:02:46 +08:00
2025-03-01 22:02:46 +08:00
2025-02-14 00:44:10 -08:00
2025-03-07 17:55:08 +00:00
2025-04-03 11:08:55 +03:00
2025-04-03 11:08:55 +03:00
2025-04-03 11:08:55 +03:00
2025-03-20 16:01:13 +00:00
2025-03-20 16:02:24 +00:00
2025-01-24 01:19:50 +00:00
2025-02-10 20:21:39 +00:00
2025-02-10 20:21:39 +00:00
2025-04-08 23:06:31 +03:00
2025-02-10 20:21:39 +00:00
2025-02-19 17:26:13 +00:00
2025-02-19 17:26:13 +00:00
2025-02-19 17:26:13 +00:00
2025-02-19 17:26:13 +00:00
2025-02-10 20:21:39 +00: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
2025-02-21 00:41:17 +00:00
2025-02-10 20:21:39 +00:00
2025-02-25 16:56:04 +00:00
2025-02-10 20:21:39 +00:00
2025-04-02 06:20:35 +11:00
2025-02-21 00:41:17 +00:00
2025-02-14 00:44:10 -08:00
2025-02-21 20:44:35 +00:00
2025-02-21 20:44:35 +00:00
2025-02-21 20:44:35 +00:00
2025-02-21 20:44:35 +00:00
2025-04-02 06:20:35 +11:00
2025-04-02 06:20:35 +11:00
2025-04-08 23:06:31 +03: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
2025-02-10 20:21:39 +00:00
2025-02-10 20:21:39 +00:00
2025-02-10 20:21:39 +00:00
2025-04-09 15:01:14 +10:00
2025-04-09 15:01:14 +10:00
2025-04-09 15:01:14 +10:00
2025-04-09 15:01:14 +10:00
2025-04-03 11:08:55 +03:00
2025-04-03 11:08:55 +03:00
2025-04-03 11:08:55 +03:00
2025-04-03 11:08:55 +03:00
2025-04-03 11:08:55 +03:00
2025-04-03 11:08:55 +03:00
2025-04-03 11:08:55 +03:00
2025-04-03 11:08:55 +03:00
2025-02-10 20:21:39 +00:00
2025-02-10 20:21:39 +00:00
2025-04-08 23:06:31 +03:00
2025-04-08 23:06:31 +03:00
2025-02-10 20:21:39 +00:00
2025-04-08 23:06:31 +03:00
2025-04-10 23:48:57 +03:00
2025-04-10 23:48:57 +03: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
2025-04-10 09:56:37 +02:00
2025-02-10 20:21:39 +00:00
2025-02-10 20:21:39 +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
2025-02-10 20:21:39 +00:00
2025-02-22 18:30:14 +00:00
2025-02-10 20:21:39 +00:00
2025-03-29 13:30:20 +03:00
2025-03-29 13:30:20 +03:00
2025-03-29 13:30:20 +03:00
2025-02-14 00:44:10 -08: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
2025-02-28 08:36:12 +11:00
2025-02-28 08:36:12 +11:00
2025-02-10 20:21:39 +00:00
2025-03-21 22:55:00 -06:00
2025-02-10 20:21:39 +00:00
2025-02-10 20:21:39 +00:00
2025-02-10 20:21:39 +00:00
2025-02-10 20:21:39 +00:00
2025-02-10 20:21:39 +00:00
2024-12-29 11:03:06 -08:00
2025-04-08 23:06:31 +03:00
2025-03-25 15:16:16 +01:00
2025-03-25 15:16:16 +01:00
2025-02-10 20:21:39 +00:00
2025-02-10 20:21:39 +00:00
2025-02-10 20:21:39 +00:00
2025-03-25 15:15:21 +01:00
2025-03-25 15:15:21 +01:00
2025-02-10 20:21:39 +00:00
2025-03-29 13:30:20 +03:00
2025-03-29 13:30:20 +03:00
2025-03-25 17:33:09 +03: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
2025-02-10 20:21:39 +00:00
2025-02-14 00:44:10 -08:00
2025-03-29 13:30:20 +03:00
2025-04-13 21:48:53 +03:00
2025-04-03 11:08:55 +03:00
2025-04-13 21:48:53 +03:00
2025-04-03 11:08:55 +03:00