diff options
| author | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2021-08-09 10:21:14 +0000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-08-09 10:21:14 +0000 |
| commit | caac7714398f386b5e157c2ff75ed4bf53e08828 (patch) | |
| tree | 7694793ae3252bb71d9554f58d29b638ee8f2946 /docs/dev/debugging.md | |
| parent | 70081619294e049eab863ddd0f0a23426b03fe57 (diff) | |
| parent | cc33b0dc82c119434967aa9609e6a7a08e38cd14 (diff) | |
Merge #9735
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 https://github.com/vsrs/rust-analyzer/blob/0b7835619a3ec7fdc5c11e6ab001ad452314a3f2/crates/ide_assists/src/handlers/sort_items.rs#L12-L83.
Relates #6110
Co-authored-by: vsrs <vit@conrlab.com>
Diffstat (limited to 'docs/dev/debugging.md')
0 files changed, 0 insertions, 0 deletions
