about summary refs log tree commit diff
path: root/src/rustllvm/RustWrapper.cpp
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2017-08-01 06:05:34 +0000
committerbors <bors@rust-lang.org>2017-08-01 06:05:34 +0000
commit6e8452ee4f66ef8b3b1f7a33d873e102bf8603d0 (patch)
tree1bf722dfb9524809ddfed52e2fefabbbae508024 /src/rustllvm/RustWrapper.cpp
parentdf90a546624c965fb2f859ed665049dbf824f40a (diff)
parenta6993d6469f73adab1bc2a73e148d1caad0ab257 (diff)
downloadrust-6e8452ee4f66ef8b3b1f7a33d873e102bf8603d0.tar.gz
rust-6e8452ee4f66ef8b3b1f7a33d873e102bf8603d0.zip
Auto merge of #43552 - petrochenkov:instab, r=jseyfried
resolve: Try to fix instability in import suggestions

cc https://github.com/rust-lang/rust/pull/42033

`lookup_import_candidates` walks module graph in DFS order and skips modules that were already visited (which is correct because there can be cycles).
However it means that if we visited `std::prelude::v1::Result::Ok` first, we will never visit `std::result::Result::Ok` because `Result` will be skipped as already visited (note: enums are also modules here), and otherwise, if we visited `std::result::Result::Ok` first, we will never get to `std::prelude::v1::Result::Ok`.
What child module of `std` (`prelude` or `result`) we will visit first, depends on randomized hashing, so we have instability in diagnostics.

With this patch modules' children are visited in stable order in `lookup_import_candidates`, this should fix the issue, but let's see what Travis will say.

r? @oli-obk
Diffstat (limited to 'src/rustllvm/RustWrapper.cpp')
0 files changed, 0 insertions, 0 deletions