Generate variant vs generate function assist on `Self`
Author: ronnodasCreated Sep 30, 2026Updated Sep 30, 2026
LabelsC-feature
In an `impl` block for an enum `Enum`, the assists offered on `Enum::ident()` seems to depend on the casing of `ident`, specifically, `Enum::Foo(arg)` gets "Generate variant" while `Enum::foo(arg)` gets "Generate foo function". However, in the same context, both `Self::Foo()` and `Self::foo()` only get "Generate ... function". It would be better if the behavior was the same between naming the type explicitly or using `Self`.
Source: rust-lang/rust-analyzer