Skip to content

Commit c99ca79

Browse files
committed
Move comments
1 parent 84d4e85 commit c99ca79

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

src/cargo/core/package.rs

+6
Original file line numberDiff line numberDiff line change
@@ -188,6 +188,12 @@ impl Package {
188188

189189
/// Returns explicit kinds either forced by `forced-target` in `Cargo.toml`,
190190
/// fallback to `default-target`, or specified in cli parameters.
191+
///
192+
/// If `--target` has not been specified, then the return value
193+
/// is the same as if `--target $HOST` was specified. See
194+
/// `rebuild_unit_graph_shared` for why callers want to do this.
195+
/// However, if the package has its own `package.default-target`
196+
/// key, then that gets used instead of `$HOST`
191197
pub fn explicit_kinds(
192198
&self,
193199
requested_kinds: &[CompileKind],

src/cargo/ops/cargo_compile.rs

-6
Original file line numberDiff line numberDiff line change
@@ -1047,12 +1047,6 @@ fn generate_targets(
10471047
let features_for = FeaturesFor::from_for_host(target.proc_macro());
10481048
let features = resolved_features.activated_features(pkg.package_id(), features_for);
10491049

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

10581052
for kind in explicit_kinds.iter() {

0 commit comments

Comments
 (0)