Auto merge of #4520 - goffrie:master, r=alexcrichton
authorbors <bors@rust-lang.org>
Thu, 21 Sep 2017 19:34:16 +0000 (19:34 +0000)
committerbors <bors@rust-lang.org>
Thu, 21 Sep 2017 19:34:16 +0000 (19:34 +0000)
Don't visit the same unit multiple times.

This fixes some accidentally-exponential behaviour we were seeing in our
fairly large workspace. It brings a no-op cargo run from about 10
seconds to 0.3 seconds on my machine.

Also changes an association list to a hashmap because that was showing
up in profiles too.


Trivial merge