Skip to content

Commit 70ad920

Browse files
committed
refactor(toml): Prefer making a Manifest from resolved_toml
1 parent 7640081 commit 70ad920

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

src/cargo/util/toml/mod.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -925,7 +925,7 @@ pub fn to_real_manifest(
925925

926926
let resolve_behavior = match (
927927
resolved_package.resolver.as_ref(),
928-
original_toml
928+
resolved_toml
929929
.workspace
930930
.as_ref()
931931
.and_then(|ws| ws.resolver.as_ref()),
@@ -942,7 +942,7 @@ pub fn to_real_manifest(
942942
// If we have a lib with no path, use the inferred lib or else the package name.
943943
let targets = targets(
944944
&features,
945-
&original_toml,
945+
&resolved_toml,
946946
package_name,
947947
package_root,
948948
edition,
@@ -1107,8 +1107,8 @@ pub fn to_real_manifest(
11071107
)?;
11081108
}
11091109

1110-
let replace = replace(&original_toml, &mut manifest_ctx)?;
1111-
let patch = patch(&original_toml, &mut manifest_ctx)?;
1110+
let replace = replace(&resolved_toml, &mut manifest_ctx)?;
1111+
let patch = patch(&resolved_toml, &mut manifest_ctx)?;
11121112

11131113
{
11141114
let mut names_sources = BTreeMap::new();
@@ -1179,7 +1179,7 @@ pub fn to_real_manifest(
11791179
rust_version: rust_version.clone(),
11801180
};
11811181

1182-
if let Some(profiles) = &original_toml.profile {
1182+
if let Some(profiles) = &resolved_toml.profile {
11831183
let cli_unstable = gctx.cli_unstable();
11841184
validate_profiles(profiles, cli_unstable, &features, warnings)?;
11851185
}
@@ -1211,7 +1211,7 @@ pub fn to_real_manifest(
12111211
let summary = Summary::new(
12121212
pkgid,
12131213
deps,
1214-
&original_toml
1214+
&resolved_toml
12151215
.features
12161216
.as_ref()
12171217
.unwrap_or(&Default::default())

0 commit comments

Comments
 (0)