bool_to_enum
assist should work on parameters
#17400
Labels
A-assists
C-feature
Category: feature request
E-has-instructions
Issue has some instructions and pointers to code to get started
https://github.com/rust-lang/rust-analyzer/blob/4af21ffb026c7ec3a97a484ca27b36f703eb5fb1/crates/ide-assists/src/handlers/bool_to_enum.rs currently only works on "local variables, fields, constants, and statics", parameters should be included in the local variables part but that is not the case as we look for
LetStmt
hererust-analyzer/crates/ide-assists/src/handlers/bool_to_enum.rs
Lines 96 to 117 in 4af21ff
So instead of looking for the statement this should look for the
IdentPat
directly, then check if that is within a let statement or parameter and act accordingly.The text was updated successfully, but these errors were encountered: