Skip to content

Commit

Permalink
fix(rust): rust analyzer fails because of unstable flag '--keep-going'
Browse files Browse the repository at this point in the history
Current rust template uses stable-23.11 channel which has cargo 1.73.0, when the VSCode Rust Analyzer runs, it will check against `--keep-going` flag with the following error message

error: the `--keep-going` flag is unstable, pass `-Z unstable-options` to enable it
See rust-lang/cargo#10496 for more information about the `--keep-going` flag.

To fix this error, we should add the `-Z unstable-options` flag in the cargo check command which Rust Analyzer runs on.
  • Loading branch information
alice39 authored Aug 28, 2024
1 parent 76ddd55 commit 5c5dbc2
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion rust/idx-template.nix
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
mkdir -p app/.idx
cp ${./dev.nix} app/.idx/dev.nix
chmod +w app/.idx/dev.nix
mkdir -p app/.vscode
printf "{\n \"rust-analyzer.cargo.extraArgs\": [\"-Z\", \"unstable-options\"]\n}" > app/.vscode/settings.json
mv app "$out"
'';
}
}

0 comments on commit 5c5dbc2

Please sign in to comment.