Expand description
Handle syntactic aspects of merging UseTrees.
Modulesยง
- version_
sort ๐
Enumsยง
- Merge
Behavior - What type of merges are allowed.
- Normalization
Style - Style to follow when normalizing a use tree.
Functionsยง
- common_
prefix - Traverses both paths until they differ, returning the common prefix of both.
- eq_
attrs - eq_
visibility - get_
single_ ๐subtree - path_
is_ ๐self - path_
len ๐ - path_
segment_ ๐cmp - recursive_
merge ๐ - Recursively merges rhs to lhs
- recursive_
normalize ๐ - Recursively normalizes a use tree and its subtrees (if any).
- remove_
subtree_ ๐if_ only_ self - try_
merge_ imports - Merge
rhsintolhskeeping both intact. Returned AST is mutable. - try_
merge_ trees - Merge
rhsintolhskeeping both intact. Returned AST is mutable. - try_
merge_ ๐trees_ mut - try_
normalize_ import - Normalizes a use item by:
- try_
normalize_ use_ tree - Normalizes a use tree (see
try_normalize_importdoc). - try_
normalize_ use_ tree_ mut - use_
tree_ ๐cmp - Orders use trees following
rustfmtโs version sorting algorithm for ordering imports. - use_
tree_ ๐cmp_ bin_ search - Use tree comparison func for binary searching for merging.
- use_
tree_ ๐cmp_ by_ tree_ list_ glob_ or_ alias - Orders for use trees with equal paths (see
use_tree_cmpfor details about use tree ordering).