From: bors Date: Sun, 17 Jul 2016 16:07:50 +0000 (-0700) Subject: Auto merge of #34871 - petrochenkov:inherent, r=jseyfried X-Git-Url: https://git.lizzy.rs/?a=commitdiff_plain;h=34f35ed29c8acdbe1e3c172786fc41d6f4fb6090;p=rust.git Auto merge of #34871 - petrochenkov:inherent, r=jseyfried 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 --- 34f35ed29c8acdbe1e3c172786fc41d6f4fb6090