fn do_resolve<'cfg>(config: &'cfg Config, ws_root: &Path) -> ResolveInfo<'cfg> {
    let requested_kinds = [CompileKind::Host];
    let ws = cargo::core::Workspace::new(&ws_root.join("Cargo.toml"), config).unwrap();
    let target_data = RustcTargetData::new(&ws, &requested_kinds).unwrap();
    let cli_features = CliFeatures::from_command_line(&[], false, true).unwrap();
    let pkgs = cargo::ops::Packages::Default;
    let specs = pkgs.to_package_id_specs(&ws).unwrap();
    let has_dev_units = HasDevUnits::Yes;
    let force_all_targets = ForceAllTargets::No;
    // Do an initial run to download anything necessary so that it does
    // not confuse criterion's warmup.
    let ws_resolve = cargo::ops::resolve_ws_with_opts(
        &ws,
        &target_data,
        &requested_kinds,
        &cli_features,
        &specs,
        has_dev_units,
        force_all_targets,
    )
    .unwrap();
    ResolveInfo {
        ws,
        requested_kinds,
        target_data,
        cli_features,
        specs,
        has_dev_units,
        force_all_targets,
        ws_resolve,
    }
}
/// Helper for resolving a workspace. This will run the resolver once to
/// download everything, and returns all the data structures that are used
/// during resolution.
Helper for resolving a workspace. This will run the resolver once to
download everything, and returns all the data structures that are used
during resolution.
Helper for resolving a workspace . This will run the resolver once to download everything and returns all the data structures that are used during resolution .
fn do_resolve<'cfg>(config: &'cfg Config, ws_root: &Path) -> ResolveInfo<'cfg> {
    let requested_kinds = [CompileKind::Host];
    let ws = cargo::core::Workspace::new(&ws_root.join("Cargo.toml"), config).unwrap();
    let target_data = RustcTargetData::new(&ws, &requested_kinds).unwrap();
    let cli_features = CliFeatures::from_command_line(&[], false, true).unwrap();
    let pkgs = cargo::ops::Packages::Default;
    let specs = pkgs.to_package_id_specs(&ws).unwrap();
    let has_dev_units = HasDevUnits::Yes;
    let force_all_targets = ForceAllTargets::No;
    // Do an initial run to download anything necessary so that it does
    // not confuse criterion's warmup.
    let ws_resolve = cargo::ops::resolve_ws_with_opts(
        &ws,
        &target_data,
        &requested_kinds,
        &cli_features,
        &specs,
        has_dev_units,
        force_all_targets,
    )
    .unwrap();
    ResolveInfo {
        ws,
        requested_kinds,
        target_data,
        cli_features,
        specs,
        has_dev_units,
        force_all_targets,
        ws_resolve,
    }
}
fn do_resolve < ' cfg > ( config : & ' cfg Config , ws_root : & Path ) -> ResolveInfo < ' cfg > { let requested_kinds = [ CompileKind :: Host ] ; let ws = cargo :: core :: Workspace :: new ( & ws_root . join ( " " ) , config ) . unwrap ( ) ; let target_data = RustcTargetData :: new ( & ws , & requested_kinds ) . unwrap ( ) ; let cli_features = CliFeatures :: from_command_line ( & [ ] , false , true ) . unwrap ( ) ; let pkgs = cargo :: ops :: Packages :: Default ; let specs = pkgs . to_package_id_specs ( & ws ) . unwrap ( ) ; let has_dev_units = HasDevUnits :: Yes ; let force_all_targets = ForceAllTargets :: No ; // Do an initial run to download anything necessary so that it does // not confuse criterion's warmup. let ws_resolve = cargo :: ops :: resolve_ws_with_opts ( & ws , & target_data , & requested_kinds , & cli_features , & specs , has_dev_units , force_all_targets , ) . unwrap ( ) ; ResolveInfo { ws , requested_kinds , target_data , cli_features , specs , has_dev_units , force_all_targets , ws_resolve , } }
Helper for resolving a workspace.
Helper for resolving a workspace .
config
&'cfg Config
ws_root
&Path
config
&'cfg Config
ws_root
&Path