Closed as not planned
Description
rust-analyzer version: [edited by @davidbarsky: it is a slightly patched rust-analyzer built from 28830ff]
rustc version: rustc 1.81.0 (eeb90cda1 2024-09-04).
editor or extension: VS Code v0.4.2007
relevant settings: None
code snippet to reproduce:
enum Magic {
Value { count: usize },
}
fn create() {
Magic::Value(42);
}
That gives the error:
expected value, found struct variant `Magic::Value` not a value
And the autofix:
you might have meant to create a new value of the struct: ` { count: /* value */}`
Applying that fix results in the code:
Magic::Value { count: /* value */ };
Namely it deletes the value 42
, when I would much prefer the replacement:
Magic::Value { count: 42 };