mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-02 14:51:48 +00:00
Add minimal support for cargo scripts
This commit is contained in:
parent
50bdeaad07
commit
2f828073aa
8 changed files with 238 additions and 16 deletions
|
@ -305,6 +305,10 @@ impl CargoWorkspace {
|
|||
.collect(),
|
||||
);
|
||||
}
|
||||
if cargo_toml.extension().is_some_and(|x| x == "rs") {
|
||||
// TODO: enable `+nightly` for cargo scripts
|
||||
other_options.push("-Zscript".to_owned());
|
||||
}
|
||||
meta.other_options(other_options);
|
||||
|
||||
// FIXME: Fetching metadata is a slow process, as it might require
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue