about summary refs log tree commit diff
path: root/docs/dev/debugging.md
diff options
context:
space:
mode:
authorbors[bot] <26634292+bors[bot]@users.noreply.github.com>2021-08-09 10:21:14 +0000
committerGitHub <noreply@github.com>2021-08-09 10:21:14 +0000
commitcaac7714398f386b5e157c2ff75ed4bf53e08828 (patch)
tree7694793ae3252bb71d9554f58d29b638ee8f2946 /docs/dev/debugging.md
parent70081619294e049eab863ddd0f0a23426b03fe57 (diff)
parentcc33b0dc82c119434967aa9609e6a7a08e38cd14 (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