Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'crates/project-model/src/cargo_workspace.rs')
-rw-r--r--crates/project-model/src/cargo_workspace.rs6
1 files changed, 4 insertions, 2 deletions
diff --git a/crates/project-model/src/cargo_workspace.rs b/crates/project-model/src/cargo_workspace.rs
index 125961210d..7bba987f7d 100644
--- a/crates/project-model/src/cargo_workspace.rs
+++ b/crates/project-model/src/cargo_workspace.rs
@@ -305,8 +305,10 @@ impl CargoWorkspace {
.collect(),
);
}
- if cargo_toml.extension().is_some_and(|x| x == "rs") {
- // TODO: enable `+nightly` for cargo scripts
+ // The manifest is a rust file, so this means its a script manifest
+ if cargo_toml.extension().is_some_and(|ext| ext == "rs") {
+ // 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());
}
meta.other_options(other_options);