Extract common fields out of ProjectWorkspace variants

This commit is contained in:
Lukas Wirth 2024-04-21 17:03:02 +02:00
parent a2ed6837bc
commit ff56cb6e49
15 changed files with 248 additions and 333 deletions

View file

@ -307,7 +307,7 @@ impl CargoWorkspace {
);
}
// The manifest is a rust file, so this means its a script manifest
if cargo_toml.extension().is_some_and(|ext| ext == "rs") {
if cargo_toml.is_rust_manifest() {
// Deliberately don't set up RUSTC_BOOTSTRAP or a nightly override here, the user should
// opt into it themselves.
other_options.push("-Zscript".to_owned());