cargo::core::compiler::artifact

Function match_artifacts_kind_with_targets

Source
pub(crate) fn match_artifacts_kind_with_targets<'t, 'd>(
    artifact_dep: &'d Dependency,
    targets: &'t [Target],
    parent_package: &str,
) -> CargoResult<HashSet<(&'d ArtifactKind, &'t Target)>>
Expand description

Given a dependency with an artifact artifact_dep and a set of available targets of its package, find a target for each kind of artifacts that are to be built.

Failure to match any target results in an error mentioning the parent manifests parent_package name.