Expand description
Reorder items.
mod
, extern crate
and use
declarations are reordered in alphabetical
order. Trait items are reordered in pre-determined order (associated types
and constants comes before methods).
Enums§
- Reorderable
Item 🔒Kind - A simplified version of
ast::ItemKind
.
Functions§
- compare_
items 🔒 - Choose the ordering between the given two items.
- contains_
macro_ 🔒use_ attr - group_
imports 🔒 - Divides imports into three groups, corresponding to standard, external and local imports. Sorts each subgroup.
- rewrite_
reorderable_ 🔒item - rewrite_
reorderable_ 🔒or_ regroupable_ items - Rewrite a list of items with reordering and/or regrouping. Every item
in
items
must have the sameast::ItemKind
. Whether reordering, regrouping, or both are done is determined from thecontext
. - wrap_
reorderable_ 🔒items