aboutsummaryrefslogtreecommitdiff
path: root/crates/hir/src/display.rs
diff options
context:
space:
mode:
authorbors[bot] <26634292+bors[bot]@users.noreply.github.com>2021-04-22 00:54:47 +0100
committerGitHub <[email protected]>2021-04-22 00:54:47 +0100
commit1f1a1ce4f57076be38d18f0a6defddb9c690bb1c (patch)
treec5859e4eb7334478b5e9ba58329b67df43e39305 /crates/hir/src/display.rs
parent32491c09787fa3b386d067f0ce95d744c1480e0b (diff)
parent72718bc2d7113874536b8bcd486aa5bd7dacafe6 (diff)
Merge #8595
8595: Diagnostic paths support specifying `remapPrefix` r=rickvanprim a=rickvanprim Currently VSCode Problem Matchers will resolve a path like `//foo_crate/src/main.rs` if `${workspaceFolder}/foo_crate/src/main.rs` exists. Presumably their behavior is functionally a string concatenation that would produce `${workspaceFolder///foo_crate/src/main.rs` and repeated path separators get ignored. This PR attempts to mimic this behavior by stripping any `Component::RootDir` from `file_name` before joining it to `workspace_root`, and then checking if the file exists. If it does, this path is used, and if not, the behavior falls through to the existing Rust path join behavior. Co-authored-by: James Leitch <[email protected]>
Diffstat (limited to 'crates/hir/src/display.rs')
0 files changed, 0 insertions, 0 deletions