fn target_path( target: &TomlTarget, inferred: &[(String, PathBuf)], target_kind: &str, package_root: &Path, edition: Edition, legacy_path: &mut dyn FnMut(&TomlTarget) -> Option<PathBuf> ) -> Result<PathBuf, String>