diff --git a/src/cargo/core/compiler/context/unit_dependencies.rs b/src/cargo/core/compiler/context/unit_dependencies.rs index db0744476c7..6e80f31a195 100644 --- a/src/cargo/core/compiler/context/unit_dependencies.rs +++ b/src/cargo/core/compiler/context/unit_dependencies.rs @@ -162,12 +162,6 @@ fn compute_deps<'a, 'cfg, 'tmp>( return false; } - // If the dependency is optional, then we're only activating it - // if the corresponding feature was activated - if dep.is_optional() && !bcx.resolve.features(id).contains(&*dep.name_in_toml()) { - return false; - } - // If we've gotten past all that, then this dependency is // actually used! true