mirror of
https://github.com/rust-lang/cargo.git
synced 2025-09-28 11:20:36 +00:00
refactor(embedded): Move workspace to normalization
This commit is contained in:
parent
3582b788cd
commit
dffd0fd4c7
@ -84,9 +84,6 @@ fn expand_manifest_(manifest: &str, path: &std::path::Path) -> CargoResult<toml:
|
||||
}
|
||||
}
|
||||
|
||||
// Prevent looking for a workspace by `read_manifest_from_str`
|
||||
manifest.insert("workspace".to_owned(), toml::Table::new().into());
|
||||
|
||||
if let Some(package) = manifest.get("package").and_then(|v| v.as_table()) {
|
||||
for key in ["workspace", "build", "links"]
|
||||
.iter()
|
||||
@ -539,8 +536,6 @@ fn main() {}
|
||||
name = "test-"
|
||||
path = "/home/me/test.rs"
|
||||
|
||||
[workspace]
|
||||
|
||||
"#]]
|
||||
);
|
||||
}
|
||||
@ -564,8 +559,6 @@ path = [..]
|
||||
[dependencies]
|
||||
time = "0.1.25"
|
||||
|
||||
[workspace]
|
||||
|
||||
"#]]
|
||||
);
|
||||
}
|
||||
|
@ -308,7 +308,10 @@ fn normalize_toml(
|
||||
build_dependencies2: None,
|
||||
target: None,
|
||||
lints: None,
|
||||
workspace: original_toml.workspace.clone(),
|
||||
workspace: original_toml.workspace.clone().or_else(|| {
|
||||
// Prevent looking for a workspace by `read_manifest_from_str`
|
||||
is_embedded.then(manifest::TomlWorkspace::default)
|
||||
}),
|
||||
profile: original_toml.profile.clone(),
|
||||
patch: normalize_patch(
|
||||
gctx,
|
||||
|
Loading…
x
Reference in New Issue
Block a user