rustfmt icon indicating copy to clipboard operation
rustfmt copied to clipboard

Draft: Add #[rustfmt::sort] and implement for enum variants and struct structs

Open Code0x58 opened this issue 5 months ago • 1 comments

#3422: add explicit rustfmt::sort attribute which causes case sensitive sorting

  • enum variants
  • struct structs

This does not raise if rustfmt::sort is applied in an unhandled place (e.g. struct, member, etc.), although that might be reasonable to pursue; at a glance, rustfmt::skip does not appear to do that, which may be more reasonable given how it can reasonably apply to anything.

TODO:

  • [ ] implement #[rustfmt::skip::sort]

Code0x58 avatar Sep 04 '24 00:09 Code0x58