Auto merge of #5293 - Eh2406:InternMoreStrings, r=alexcrichton
authorbors <bors@rust-lang.org>
Wed, 4 Apr 2018 19:49:20 +0000 (19:49 +0000)
committerbors <bors@rust-lang.org>
Wed, 4 Apr 2018 19:49:20 +0000 (19:49 +0000)
Intern more strings

As pointed out in https://github.com/rust-lang/cargo/pull/5270#issuecomment-378372147, that clean up adds the mildly expensive `InternedString::new` to the hot path in the resolver.

The process of this PR is:
1. Find a `InternedString::new` in the hot path.
2. replace the argument of type `&str` that is passed along to `InternedString::new` with the type `InternedString`
3. add an `InternedString::new` to the callers until it type checked.
4. Repeat from step 1.

This stop if:
- It was traced back to something that was already an `InternedString`
- It was traced back to a `.to_string()` call
- It was in a persistent object creation

cc:
- @djc this is building on your work, I don't want to get in your way.
- @alexcrichton is this making things clearer and do you want to see a performance check?


Trivial merge