Auto merge of #14749 - matklad:matklad/panic-is-a-problem, r=lnicola

feat: define problem matcher for panics in VS Code

Now in VS Code "go to next error" (`F8`) will bring you to the source of a panic.
This commit is contained in:
bors 2023-05-06 15:54:00 +00:00
commit 5ee39a6ee5
2 changed files with 23 additions and 1 deletions

View file

@ -1512,6 +1512,18 @@
"endColumn": 6
}
]
},
{
"name": "rust-panic",
"patterns": [
{
"regexp": "^thread '.*' panicked at '(.*)', (.*):(\\d*):(\\d*)$",
"message": 1,
"file": 2,
"line": 3,
"column": 4
}
]
}
],
"languages": [
@ -1561,6 +1573,16 @@
],
"pattern": "$rustc-json"
},
{
"name": "rust-panic",
"owner": "rust-panic",
"source": "panic",
"fileLocation": [
"autoDetect",
"${workspaceRoot}"
],
"pattern": "$rust-panic"
},
{
"name": "rustc-watch",
"owner": "rustc",

View file

@ -128,7 +128,7 @@ export async function buildCargoTask(
name,
TASK_SOURCE,
exec,
["$rustc"]
["$rustc", "$rust-panic"]
);
}