Module rustfmt_nightly::reorder
source ยท 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ยง
- ReorderableItemKind ๐A simplified version of
ast::ItemKind.
Functionsยง
- compare_items ๐Choose the ordering between the given two items.
- group_imports ๐Divides imports into three groups, corresponding to standard, external and local imports. Sorts each subgroup.
- Rewrite a list of items with reordering and/or regrouping. Every item in
itemsmust have the sameast::ItemKind. Whether reordering, regrouping, or both are done is determined from thecontext.