Jonathan Brouwer
8a34a4e505
Rollup merge of #156847 - sappho3:fix-suggestion-unused-variables-struct-pattern, r=JonathanBrouwer
...
Fix suggestion of unused variables with raw identifier in struct pattern
This MR fixes a broken lint suggestion that occurs when a struct pattern contains an unused variable written with a raw identifier.
In the following fragment, `r#move` is an unused variable. The compiler suggested to change it to `move: _` which doesn’t compile since move is a keyword. This change makes it so that the suggestion becomes `r#move: _`
```rust
struct Foo {
r#move: u32
}
fn bar(foo: Foo) -> u32 {
match foo {
Foo { r#move } => 0
}
}
```
r? JonathanBrouwer
2026-05-24 21:28:53 +02:00
..
2026-05-13 19:47:14 +00:00
2026-05-13 19:47:14 +00:00
2025-12-30 22:01:49 -05:00
2026-05-05 12:36:39 +02:00
2025-09-11 16:13:32 -07:00
2025-10-08 19:44:56 +00:00
2026-05-05 12:36:39 +02:00
2026-05-07 21:55:44 +03:00
2026-03-07 10:42:02 -08:00
2026-04-20 00:18:28 +08:00
2026-05-13 19:47:14 +00:00
2026-05-02 17:40:33 +02:00
2026-04-20 00:18:28 +08:00
2025-10-23 00:38:28 +00:00
2025-11-07 13:57:37 -07:00
2025-06-29 20:39:13 +08:00
2026-05-13 19:47:14 +00:00
2026-05-13 19:47:14 +00:00
2026-05-13 19:47:14 +00:00
2025-12-21 00:58:00 +00:00
2026-04-20 00:18:28 +08:00
2025-10-08 15:03:43 +00:00
2026-05-17 01:27:37 +00:00
2026-04-23 11:17:22 +01:00
2026-04-20 00:18:28 +08:00
2026-05-02 17:40:33 +02:00
2026-05-15 18:05:42 +00:00
2026-05-13 19:47:14 +00:00
2026-04-20 00:18:28 +08:00
2026-05-14 22:15:20 +00:00
2026-05-02 17:40:33 +02:00
2026-05-02 17:40:33 +02:00
2026-05-24 21:28:53 +02:00
2026-02-24 20:34:22 +01:00
2026-04-20 00:18:28 +08:00
2026-05-13 19:47:14 +00:00
2026-04-20 00:18:28 +08:00
2026-05-16 14:06:44 +05:00
2026-05-13 19:47:14 +00:00
2026-05-13 19:47:14 +00:00
2026-05-17 01:27:37 +00:00
2026-05-13 19:47:14 +00:00
2026-05-21 12:21:45 +02:00
2026-03-06 18:52:11 +01:00
2026-05-13 19:47:14 +00:00
2026-05-23 09:33:09 +02:00
2026-05-02 17:40:33 +02:00
2025-06-29 20:13:36 +08:00
2026-05-13 19:47:14 +00:00
2026-03-11 06:25:23 +11:00
2025-04-12 11:53:07 +00:00
2026-05-16 14:06:44 +05:00
2025-10-19 02:22:18 +00:00
2026-04-20 00:18:28 +08:00
2024-09-10 09:11:17 +10:00
2025-04-29 14:58:21 +00:00
2026-05-13 19:47:14 +00:00
2026-05-02 17:40:33 +02:00
2026-05-13 19:47:14 +00:00
2025-10-02 14:55:50 +08:00
2025-10-02 14:55:50 +08:00
2026-05-12 21:58:50 +02:00
2026-04-10 09:32:35 +02:00
2026-05-13 19:47:14 +00:00
2024-09-22 19:11:29 -04:00
2024-09-03 16:03:46 +10:00
2026-05-09 01:01:03 -07:00
2026-05-13 19:47:14 +00:00
2026-05-13 19:47:14 +00:00
2026-05-13 19:47:14 +00:00
2026-05-02 17:40:33 +02:00
2026-05-13 19:47:14 +00:00
2026-05-13 19:47:14 +00:00
2026-05-13 19:47:14 +00:00
2026-03-11 05:40:44 +08:00
2026-05-13 19:47:14 +00:00
2026-05-13 19:47:14 +00:00
2026-02-17 10:11:01 +08:00
2026-05-17 01:27:37 +00:00