Module merge_imports

Source
Expand description

Handle syntactic aspects of merging UseTrees.

Enums§

MergeBehavior
What type of merges are allowed.
NormalizationStyle
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
try_merge_imports
Merge rhs into lhs keeping both intact. Returned AST is mutable.
try_merge_trees
Merge rhs into lhs keeping both intact. Returned AST is mutable.
try_normalize_import
Normalizes a use item by:
try_normalize_use_tree
Normalizes a use tree (see try_normalize_import doc).
try_normalize_use_tree_mut