minor improvement to how artifact targets are handled in platform descriptions

This commit is contained in:
Sebastian Thiel 2022-03-01 13:18:36 +08:00
parent 9ede09a1c8
commit 14ddbf3e47
No known key found for this signature in database
GPG Key ID: 9CB5EE7895E8268B

View File

@ -772,9 +772,14 @@ impl<'a, 'cfg> FeatureResolver<'a, 'cfg> {
// We always count platforms as activated if the target stems from an artifact
// dependency's target specification. This triggers in conjunction with
// `[target.'cfg(…)'.dependencies]` manifest sections.
if matches!(fk, FeaturesFor::NormalOrDevOrArtifactTarget(Some(_))) {
if let FeaturesFor::NormalOrDevOrArtifactTarget(Some(target)) = fk {
if self
.target_data
.dep_platform_activated(dep, CompileKind::Target(target))
{
return true;
}
}
// Not a build dependency, and not for a build script, so must be Target.
self.requested_targets
.iter()