rust-analyzer version: 0.3.2593-standalone
rustc version: 1.89.0
editor or extension: VS Code
code snippet to reproduce:
enum Enum {
Variant { inner: u8 },
}
fn dostuff(e: Enum) {
match e {
Enum::Variant { .. } => {}
}
}
Invoking the "Convert to tuple struct" assist on Variant
results in this code:
enum Enum {
Variant(u8),
}
fn dostuff(e: Enum) {
match e {
Enum::Variant() => {} // <- here
}
}
Instead, the pattern for the tuple variant should look like Enum::Variant(..)
in order to compile.