about summary refs log tree commit diff
path: root/src/test/codegen/src-hash-algorithm
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2022-06-03 07:49:59 +0000
committerbors <bors@rust-lang.org>2022-06-03 07:49:59 +0000
commit58b6d46d5a91cc2fceccd583f22cb7c92dca89c9 (patch)
treeaa2b7e3fad73f8fb85b7f76e10899b6e0b141602 /src/test/codegen/src-hash-algorithm
parentea15e1000fda6ef0bd9aed9569884da301e73db5 (diff)
parent8e5b318d99d3d215ab0ae84b1a80e8034975002d (diff)
downloadrust-58b6d46d5a91cc2fceccd583f22cb7c92dca89c9.tar.gz
rust-58b6d46d5a91cc2fceccd583f22cb7c92dca89c9.zip
Auto merge of #12333 - nolanderc:order-import-assist, r=Veykril
Order auto-imports by relevance

Fixes #10337.

Basically we sort the imports according to how "far away" the imported item is from where we want to import it to. This change makes it so that imports from the current crate are sorted before any third-party crates. Additionally, we make an exception for builtin crates (`std`, `core`, etc.) so that they are sorted before any third-party crates.

There are probably other heuristics that should be added to improve the experience (such as preferring imports that are common elsewhere in the same crate, and ranking crates depending on the dependency graph). However, I think this is a first good step.

PS. This is my first time contributing here, so please be gentle if I have missed something obvious :-)
Diffstat (limited to 'src/test/codegen/src-hash-algorithm')
0 files changed, 0 insertions, 0 deletions