Closed
Description
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
here
rust-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.