Files
rust/tests/ui/consts
Jonathan Brouwer 72ccf9bcb3 Rollup merge of #163106 - Albab-Hasan:const-pattern-note-raw-idents, r=oli-obk
emit the constant pattern note for raw identifier bindings

`is_const_pat_that_looks_like_binding` matched the pattern snippet against a plain identifier so the `#` in `let r#x = 0` rejected it and the binding lost both the label pointing at `const x` and the `introduce a variable instead` suggestion. strip a leading `r#` before the check and render the const name with `to_ident_string` in the label so a keyword name prints as `r#fn`.

fixes https://github.com/rust-lang/rust/issues/162949

r? @oli-obk
2026-09-22 13:23:38 +02:00
..
2026-02-22 20:20:33 +01:00
2026-09-06 12:27:09 +02:00
2026-09-17 21:00:06 +02:00
2025-11-02 20:12:26 +00:00
2026-09-14 10:41:39 +03:00
2026-08-24 19:04:00 +02:00
2026-08-24 19:04:00 +02:00
2025-11-02 20:12:26 +00:00
2026-04-28 10:36:32 +02:00
2026-06-29 12:53:42 +03:00
2025-02-27 20:02:25 +00:00
2026-09-14 10:41:39 +03:00
2026-09-14 10:41:39 +03:00
2026-06-29 12:44:53 +03:00
2026-06-29 12:53:42 +03:00
2025-12-02 18:25:13 +00:00
2025-09-12 12:39:31 +03:00
2025-11-02 20:12:26 +00:00
2026-01-18 22:41:00 +01:00
2026-09-06 12:27:09 +02:00
2025-11-02 20:12:26 +00:00
2025-11-02 20:12:26 +00:00
2025-07-13 13:50:01 +00:00
2026-07-01 13:54:00 +03:00
2026-06-29 12:53:42 +03:00
2026-06-29 12:44:53 +03:00
2025-11-27 14:13:58 -05:00
2025-11-27 14:13:58 -05:00
2026-06-29 12:53:42 +03:00
2026-06-29 12:44:53 +03:00
2026-07-13 10:54:53 +02:00
2025-07-21 09:11:21 +00:00
2025-11-02 20:12:26 +00:00
2026-06-29 12:53:42 +03:00
2025-08-05 19:34:46 +05:00
2025-02-23 23:11:00 +07:00
2026-06-29 12:44:53 +03:00
2026-06-29 12:53:42 +03:00
…
2025-09-12 14:45:12 -04:00
2026-01-18 22:41:00 +01:00
2026-07-13 10:54:53 +02:00
2026-06-11 14:56:44 +00:00
2026-01-18 22:41:00 +01:00
2026-01-18 22:41:00 +01:00
2026-01-18 22:41:00 +01:00
2026-08-24 19:04:00 +02:00