Rust Analyser Update VS Code

34 Views Asked by At

After updating the Rust Analyser extension, tasks stopped working.

My Rust Analyser configuration is the following:

{
    "type": "cargo",
    "command": "build",
    "problemMatcher": [
        "$rustc"
    ],
    "group": {
        "kind": "build",
        "isDefault": true
    },
    "label": "rust: cargo build debug all"
}
1

There are 1 best solutions below

0
chloedev On

I have changed the task format slightly to:

{
    "type": "process",
    "command": "cargo",
    "args": [
        "build"
    ],
    "problemMatcher": [
        "$rustc"
    ],
    "group": {
        "kind": "build",
        "isDefault": true
    },
    "label": "rust: cargo build debug all"
}

Essentially changing the task type from "cargo" to "process", the command from "build" to "cargo" and moving the build command into the arguments section.