rust-analyzer/crates/ide-assists
bors 7e8f9c82e1 Auto merge of #17467 - winstxnhdw:bool-to-enum, r=Veykril
feat: add bool_to_enum assist for parameters

## Summary

This PR adds parameter support for `bool_to_enum` assists. Essentially, the assist can now transform this:

```rs
fn function($0foo: bool) {
    if foo {
        println!("foo");
    }
}
```

To this,

```rs
#[derive(PartialEq, Eq)]
enum Bool { True, False }

fn function(foo: Bool) {
    if foo == Bool::True {
        println!("foo");
    }
}
```

Thanks to `@/davidbarsky`  for the test skeleton (:

Closes #17400
2024-06-30 12:26:07 +00:00
..
src Auto merge of #17467 - winstxnhdw:bool-to-enum, r=Veykril 2024-06-30 12:26:07 +00:00
Cargo.toml Move diagnostics docs generation into xtask/codegen 2024-03-04 17:14:14 +01:00