mirror of
https://github.com/rust-lang/rust-analyzer
synced 2024-11-15 01:17:27 +00:00
Merge #8994
8994: Check for subdirs in vfs loader exclusions. r=matklad a=ammkrn The current logic used to transfer global_excludes into vfs exclusions only transfers global_excludes that are the parent of an item in dirs.include. This commit additionally adds an item from global_exclude to the vfs exclusions if the global_exclude is a child of an included item. Co-authored-by: ammkrn <ammkrn@tuta.io>
This commit is contained in:
commit
3b10f9e714
1 changed files with 5 additions and 1 deletions
|
@ -455,7 +455,11 @@ impl ProjectFolders {
|
|||
dirs.include.extend(root.include);
|
||||
dirs.exclude.extend(root.exclude);
|
||||
for excl in global_excludes {
|
||||
if dirs.include.iter().any(|incl| incl.starts_with(excl)) {
|
||||
if dirs
|
||||
.include
|
||||
.iter()
|
||||
.any(|incl| incl.starts_with(excl) || excl.starts_with(incl))
|
||||
{
|
||||
dirs.exclude.push(excl.clone());
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue