Files
rust/compiler
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-07 22:22:56 +09:00
2026-05-04 16:28:58 +00:00
2026-05-04 16:28:58 +00:00
2026-05-11 21:32:42 +02:00
2026-05-12 21:58:50 +02:00
2026-05-22 12:36:19 +03:00
2026-05-12 21:58:50 +02:00