Skip to content

Commit

Permalink
Move comments
Browse files Browse the repository at this point in the history
  • Loading branch information
fee1-dead committed Jan 29, 2022
1 parent 84d4e85 commit c99ca79
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 6 additions & 0 deletions src/cargo/core/package.rs
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,12 @@ impl Package {

/// Returns explicit kinds either forced by `forced-target` in `Cargo.toml`,
/// fallback to `default-target`, or specified in cli parameters.
///
/// If `--target` has not been specified, then the return value
/// is the same as if `--target $HOST` was specified. See
/// `rebuild_unit_graph_shared` for why callers want to do this.
/// However, if the package has its own `package.default-target`
/// key, then that gets used instead of `$HOST`
pub fn explicit_kinds(
&self,
requested_kinds: &[CompileKind],
Expand Down
6 changes: 0 additions & 6 deletions src/cargo/ops/cargo_compile.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1047,12 +1047,6 @@ fn generate_targets(
let features_for = FeaturesFor::from_for_host(target.proc_macro());
let features = resolved_features.activated_features(pkg.package_id(), features_for);

// If `--target` has not been specified, then the unit
// graph is built almost like if `--target $HOST` was
// specified. See `rebuild_unit_graph_shared` for more on
// why this is done. However, if the package has its own
// `package.target` key, then this gets used instead of
// `$HOST`
let explicit_kinds = pkg.explicit_kinds(requested_kinds, explicit_host_kind);

for kind in explicit_kinds.iter() {
Expand Down

0 comments on commit c99ca79

Please sign in to comment.