diff options
| author | bors <bors@rust-lang.org> | 2024-06-30 12:26:07 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2024-06-30 12:26:07 +0000 |
| commit | ba01c0ab3944b104d12109303ea8004f0bc949ce (patch) | |
| tree | 8e168f464d16c3bb5af75201a32c6c78f92a58e8 /tests/codegen/patchable-function-entry/patchable-function-entry-both-flags.rs | |
| parent | 079ee28362b640105aa93483975e3f6797f43014 (diff) | |
| parent | a456692c165231870d1c6baef38eef1e7c196198 (diff) | |
| download | rust-ba01c0ab3944b104d12109303ea8004f0bc949ce.tar.gz rust-ba01c0ab3944b104d12109303ea8004f0bc949ce.zip | |
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
Diffstat (limited to 'tests/codegen/patchable-function-entry/patchable-function-entry-both-flags.rs')
0 files changed, 0 insertions, 0 deletions
