Skip to content

Commit

Permalink
Auto merge of rust-lang#14749 - matklad:matklad/panic-is-a-problem, r…
Browse files Browse the repository at this point in the history
…=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.
  • Loading branch information
bors committed May 6, 2023
2 parents a4966c9 + 7bc60f5 commit 5ee39a6
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 1 deletion.
22 changes: 22 additions & 0 deletions editors/code/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": [
Expand Down Expand Up @@ -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",
Expand Down
2 changes: 1 addition & 1 deletion editors/code/src/tasks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ export async function buildCargoTask(
name,
TASK_SOURCE,
exec,
["$rustc"]
["$rustc", "$rust-panic"]
);
}

Expand Down

0 comments on commit 5ee39a6

Please sign in to comment.