aboutsummaryrefslogtreecommitdiff
path: root/editors
diff options
context:
space:
mode:
authorbors[bot] <26634292+bors[bot]@users.noreply.github.com>2020-05-20 08:57:49 +0100
committerGitHub <[email protected]>2020-05-20 08:57:49 +0100
commit5d080dd0240f9be3e2cb46dafeaad5f716b01b50 (patch)
tree32c5f990f4cb84ed322d107418ad4373a09bcd6b /editors
parentc0bcaea46652ade4259559f08368179d54d4fdd1 (diff)
parentd264d7b9f264c31fe2b1ea7e623611a816979789 (diff)
Merge #4528
4528: Debug lens fix for a binary. r=matklad a=vsrs Fixes an issue reported here: https://github.com/rust-analyzer/rust-analyzer/pull/4222#issuecomment-631073448 Co-authored-by: vsrs <[email protected]>
Diffstat (limited to 'editors')
-rw-r--r--editors/code/src/cargo.ts12
1 files changed, 8 insertions, 4 deletions
diff --git a/editors/code/src/cargo.ts b/editors/code/src/cargo.ts
index 28c7de992..6a41873d0 100644
--- a/editors/code/src/cargo.ts
+++ b/editors/code/src/cargo.ts
@@ -51,10 +51,14 @@ export class Cargo {
51 51
52 // arguments for a runnable from the quick pick should be updated. 52 // arguments for a runnable from the quick pick should be updated.
53 // see crates\rust-analyzer\src\main_loop\handlers.rs, handle_code_lens 53 // see crates\rust-analyzer\src\main_loop\handlers.rs, handle_code_lens
54 if (cargoArgs[0] === "run") { 54 switch (cargoArgs[0]) {
55 cargoArgs[0] = "build"; 55 case "run": cargoArgs[0] = "build"; break;
56 } else if (cargoArgs.indexOf("--no-run") === -1) { 56 case "test": {
57 cargoArgs.push("--no-run"); 57 if (cargoArgs.indexOf("--no-run") === -1) {
58 cargoArgs.push("--no-run");
59 }
60 break;
61 }
58 } 62 }
59 63
60 let artifacts = await this.artifactsFromArgs(cargoArgs); 64 let artifacts = await this.artifactsFromArgs(cargoArgs);