]> git.proxmox.com Git - cargo.git/commitdiff
Do not download dependencies from other platforms
authorWim Hueskes <rust@wimhueskes.eu>
Mon, 26 Sep 2016 22:55:58 +0000 (00:55 +0200)
committerWim Hueskes <rust@wimhueskes.eu>
Mon, 26 Sep 2016 22:59:23 +0000 (00:59 +0200)
src/cargo/ops/cargo_rustc/context.rs

index 922da9ccdf80ccfcfaae0fbfd26693f08386273a..fe0a94241411c6d60b2e7c8563243f3ddf6dedf0 100644 (file)
@@ -454,7 +454,7 @@ impl<'a, 'cfg> Context<'a, 'cfg> {
         let deps = self.resolve.deps(id);
         let mut ret = try!(deps.filter(|dep| {
             unit.pkg.dependencies().iter().filter(|d| {
-                d.name() == dep.name()
+                d.name() == dep.name() && d.version_req().matches(dep.version())
             }).any(|d| {
                 // If this target is a build command, then we only want build
                 // dependencies, otherwise we want everything *other than* build