rust/src/tools/rust-analyzer
bors ba01c0ab39 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
..
.cargo fix: Fix generated markers not being patchable in package.json 2024-06-08 12:54:43 +02:00
.github Bump actions/download-artifact and upload-artifact 2024-06-25 20:32:09 +03:00
.vscode Make generate function assist generate a function as a constructor if the name of function is new 2024-04-30 17:02:48 +09:00
assets Make generate function assist generate a function as a constructor if the name of function is new 2024-04-30 17:02:48 +09:00
bench_data Make generate function assist generate a function as a constructor if the name of function is new 2024-04-30 17:02:48 +09:00
crates Auto merge of #17467 - winstxnhdw:bool-to-enum, r=Veykril 2024-06-30 12:26:07 +00:00
docs Fix suggestions of unstable constants 2024-06-22 21:33:58 +03:00
editors/code Auto merge of #17411 - Wilfred:clearer_unlinked_file, r=Veykril 2024-06-24 08:11:43 +00:00
lib style: simplify string interpolation 2024-05-30 16:18:49 -07:00
xtask Simplify 2024-06-30 14:00:55 +02:00
.editorconfig Make generate function assist generate a function as a constructor if the name of function is new 2024-04-30 17:02:48 +09:00
.git-blame-ignore-revs Make generate function assist generate a function as a constructor if the name of function is new 2024-04-30 17:02:48 +09:00
.gitattributes Make generate function assist generate a function as a constructor if the name of function is new 2024-04-30 17:02:48 +09:00
.gitignore Make generate function assist generate a function as a constructor if the name of function is new 2024-04-30 17:02:48 +09:00
.typos.toml Make generate function assist generate a function as a constructor if the name of function is new 2024-04-30 17:02:48 +09:00
Cargo.lock move tt-iter into tt crate 2024-06-24 14:47:21 +02:00
Cargo.toml Fix expression scope calculation when within macro expansions 2024-06-30 13:26:17 +02:00
clippy.toml Make generate function assist generate a function as a constructor if the name of function is new 2024-04-30 17:02:48 +09:00
CONTRIBUTING.md chore: add some tracing to project loading 2024-04-22 11:39:01 -04:00
LICENSE-APACHE Make generate function assist generate a function as a constructor if the name of function is new 2024-04-30 17:02:48 +09:00
LICENSE-MIT Make generate function assist generate a function as a constructor if the name of function is new 2024-04-30 17:02:48 +09:00
PRIVACY.md Make generate function assist generate a function as a constructor if the name of function is new 2024-04-30 17:02:48 +09:00
README.md Make generate function assist generate a function as a constructor if the name of function is new 2024-04-30 17:02:48 +09:00
rust-bors.toml Make generate function assist generate a function as a constructor if the name of function is new 2024-04-30 17:02:48 +09:00
rust-version Preparing for merge from rust-lang/rust 2024-06-20 08:03:11 +03:00
rustfmt.toml Make generate function assist generate a function as a constructor if the name of function is new 2024-04-30 17:02:48 +09:00
triagebot.toml Update triagebot.toml 2024-06-27 10:32:13 +02:00

rust-analyzer logo

rust-analyzer is a modular compiler frontend for the Rust language. It is a part of a larger rls-2.0 effort to create excellent IDE support for Rust.

Quick Start

https://rust-analyzer.github.io/manual.html#installation

Documentation

If you want to contribute to rust-analyzer check out the CONTRIBUTING.md or if you are just curious about how things work under the hood, check the ./docs/dev folder.

If you want to use rust-analyzer's language server with your editor of choice, check the manual folder. It also contains some tips & tricks to help you be more productive when using rust-analyzer.

Security and Privacy

See the corresponding sections of the manual.

Communication

For usage and troubleshooting requests, please use "IDEs and Editors" category of the Rust forum:

https://users.rust-lang.org/c/ide/14

For questions about development and implementation, join rust-analyzer working group on Zulip:

https://rust-lang.zulipchat.com/#narrow/stream/185405-t-compiler.2Frust-analyzer

License

rust-analyzer is primarily distributed under the terms of both the MIT license and the Apache License (Version 2.0).

See LICENSE-APACHE and LICENSE-MIT for details.