about summary refs log tree commit diff
path: root/compiler/rustc_pattern_analysis/src/errors.rs
diff options
context:
space:
mode:
authorWilfred Hughes <wilfred@meta.com>2024-04-17 11:25:17 -0700
committerWilfred Hughes <wilfred@meta.com>2024-04-17 14:40:01 -0700
commitbd133eecdaed3bc72f35bd87e72bd540a666e84d (patch)
treefe9115d2f550701e1475f99c2c2ec8e48b8107cb /compiler/rustc_pattern_analysis/src/errors.rs
parent46702ffc1a02a2ac153f1d1ce619ec917af8f3a6 (diff)
downloadrust-bd133eecdaed3bc72f35bd87e72bd540a666e84d.tar.gz
rust-bd133eecdaed3bc72f35bd87e72bd540a666e84d.zip
fix: VFS should not walk circular symlinks
As of #6246, rust-analyzer follows symlinks. This can introduce an
infinite loop if symlinks point to parent directories.

Considering that #6246 was added in 2020 without many bug reports,
this is clearly a rare occurrence. However, I am observing
rust-analyzer hang on projects that have symlinks of the form:

```
test/a_symlink -> ../../
```

Ignore symlinks that only point to the parent directories, as this is
more robust but still allows typical symlink usage patterns.
Diffstat (limited to 'compiler/rustc_pattern_analysis/src/errors.rs')
0 files changed, 0 insertions, 0 deletions