about summary refs log tree commit diff
path: root/tests/codegen/patchable-function-entry/patchable-function-entry-both-flags.rs
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2024-06-30 12:26:07 +0000
committerbors <bors@rust-lang.org>2024-06-30 12:26:07 +0000
commitba01c0ab3944b104d12109303ea8004f0bc949ce (patch)
tree8e168f464d16c3bb5af75201a32c6c78f92a58e8 /tests/codegen/patchable-function-entry/patchable-function-entry-both-flags.rs
parent079ee28362b640105aa93483975e3f6797f43014 (diff)
parenta456692c165231870d1c6baef38eef1e7c196198 (diff)
downloadrust-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