about summary refs log tree commit diff
path: root/tests/coverage/branch/lazy-boolean.rs
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2024-04-13 20:30:08 +0000
committerbors <bors@rust-lang.org>2024-04-13 20:30:08 +0000
commit773b4a5ac72fa3f981b9e57a57707de651dd87aa (patch)
tree93548021f1cc5f657a939f2cb5a36530770df14a /tests/coverage/branch/lazy-boolean.rs
parent9b1946250f954f4b6f0c465418c1e216a95ce3bd (diff)
parentb03844d786a8bb6502e62b250dd3bc65d82795bf (diff)
downloadrust-773b4a5ac72fa3f981b9e57a57707de651dd87aa.tar.gz
rust-773b4a5ac72fa3f981b9e57a57707de651dd87aa.zip
Auto merge of #17019 - Wilfred:source_root_prefixes, r=Veykril
fix: VFS should not confuse paths with source roots that have the same prefix

Previously, the VFS would assign paths to the source root that had the longest string prefix match. This would break when we had source roots in subdirectories:

```
/foo
/foo/bar
```

Given a file `/foo/bar_baz.rs`, we would attribute it to the `/foo/bar` source root, which is wrong.

As a result, we would attribute paths to the wrong crate when a crate was in a subdirectory of another one. This is more common in larger monorepos, but could occur in any Rust project.

Fix this in the VFS, and add a test.
Diffstat (limited to 'tests/coverage/branch/lazy-boolean.rs')
0 files changed, 0 insertions, 0 deletions