Module 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.
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 same ast::ItemKind. Whether reordering, regrouping, or both are done is determined from the context.
wrap_reorderable_items 🔒