From: bors[bot] <26634292+bors[bot]@users.noreply.github.com> Date: Wed, 16 Sep 2020 20:03:41 +0000 (+0000) Subject: Merge #5989 X-Git-Url: https://git.lizzy.rs/?a=commitdiff_plain;h=3877421373ef1439e53b7f7274865af287dbb47f;p=rust.git Merge #5989 5989: Rewrite import merging r=jonas-schievink a=Veykril Rewrites how import merging is being handled. It is now a recursive function to properly handle merging of intermediate levels in the import trees. With this ordering the imports is also now possible tho it doesn't quite order it the same way as `rustfmt` does yet, namely it orders lowercase identifiers after uppercase identifiers as that is the standard character order that rust uses. This also fixes a few weird behaviors that were visible in some of the `replace_qualified_name_with_use.rs` tests. This really took longer than I was hoping for, fighting with import trees is quite the exhausting task 😅 Co-authored-by: Lukas Wirth --- 3877421373ef1439e53b7f7274865af287dbb47f