caac771439
9735: Add assist to sort members alphabetically. r=matklad a=vsrs
Supports traits, impls, structs, unions and enums (including inner struct variants). Does not support modules yet.
```rust
en┃um Animal {
Dog(String, f64),
Cat { weight: f64, name: String },
}
```
->
```rust
enum Animal {
Cat { weight: f64, name: String },
Dog(String, f64),
}
```
---
```rust
enum Animal {
Dog(String, f64),
Cat {┃ weight: f64, name: String },
}
```
->
```rust
enum Animal {
Dog(String, f64),
Cat { name: String, weight: f64 },
}
```
---
More samples in docs
|
||
---|---|---|
.. | ||
base_db | ||
cfg | ||
flycheck | ||
hir | ||
hir_def | ||
hir_expand | ||
hir_ty | ||
ide | ||
ide_assists | ||
ide_completion | ||
ide_db | ||
ide_diagnostics | ||
ide_ssr | ||
limit | ||
mbe | ||
parser | ||
paths | ||
proc_macro_api | ||
proc_macro_srv | ||
proc_macro_test | ||
profile | ||
project_model | ||
rust-analyzer | ||
sourcegen | ||
stdx | ||
syntax | ||
test_utils | ||
text_edit | ||
toolchain | ||
tt | ||
vfs | ||
vfs-notify |