]> git.lizzy.rs Git - rust.git/commitdiff
Auto merge of #34871 - petrochenkov:inherent, r=jseyfried
authorbors <bors@rust-lang.org>
Sun, 17 Jul 2016 16:07:50 +0000 (09:07 -0700)
committerGitHub <noreply@github.com>
Sun, 17 Jul 2016 16:07:50 +0000 (09:07 -0700)
Do not resolve inherent static methods from other crates prematurely

Under some specific circumstances paths like `Type::method` can be resolved early in rustc_resolve instead of type checker. `Type` must be defined in another crate, it should be an enum or a trait object (i.e. a type that acts as a "module" in resolve), and `method` should be an inherent static method.
As a result, such paths don't go through `resolve_ufcs`, may be resolved incorrectly and break some invariants in type checker. This patch removes special treatment of such methods.

The removed code was introduced in https://github.com/rust-lang/rust/commit/2bd46e767c0fe5b6188df61cb9daf8f2e65a3ed0 to fix a problem that no longer exists.

r? @jseyfried


Trivial merge