Provide a note if method lookup fails and there are static definitions with the same name.
rustc: Crawl static initializers for reachability

This ensures that private functions exported through static initializers will
actually end up being public in the object file (so other objects can continue
to reference the function).

Closes #13620
auto merge of #13685 : Ryman/rust/issue7575, r=alexcrichton

Closes #7575.

I don't think the change from a contains lookup to an iteration of the HashSet in the resolver should be much of a burden as the set of methods with the same name should be relatively small.
auto merge of #13906 : alexcrichton/rust/issue-13620, r=luqmana

This ensures that private functions exported through static initializers will
actually end up being public in the object file (so other objects can continue
to reference the function).

Closes #13620