diff --git a/src/cargo/sources/registry.rs b/src/cargo/sources/registry.rs index f989559c3c1..a112f4e7b52 100644 --- a/src/cargo/sources/registry.rs +++ b/src/cargo/sources/registry.rs @@ -417,10 +417,11 @@ impl<'a, 'b> RegistrySource<'a, 'b> { let dep = try!(Dependency::parse(name.as_slice(), Some(req.as_slice()), &self.source_id)); - drop(target); // FIXME: pass this in + Ok(dep.optional(optional) .default_features(default_features) - .features(features)) + .features(features) + .only_for_platform(target)) } /// Actually perform network operations to update the registry