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 <vit@conrlab.com>
This commit is contained in:
commit
5d080dd024
@ -51,10 +51,14 @@ export class Cargo {
|
||||
|
||||
// arguments for a runnable from the quick pick should be updated.
|
||||
// see crates\rust-analyzer\src\main_loop\handlers.rs, handle_code_lens
|
||||
if (cargoArgs[0] === "run") {
|
||||
cargoArgs[0] = "build";
|
||||
} else if (cargoArgs.indexOf("--no-run") === -1) {
|
||||
cargoArgs.push("--no-run");
|
||||
switch (cargoArgs[0]) {
|
||||
case "run": cargoArgs[0] = "build"; break;
|
||||
case "test": {
|
||||
if (cargoArgs.indexOf("--no-run") === -1) {
|
||||
cargoArgs.push("--no-run");
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
let artifacts = await this.artifactsFromArgs(cargoArgs);
|
||||
|
Loading…
x
Reference in New Issue
Block a user