about summary refs log tree commit diff
path: root/compiler/rustc_llvm/llvm-wrapper/CoverageMappingWrapper.cpp
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2024-08-10 02:10:12 +0000
committerbors <bors@rust-lang.org>2024-08-10 02:10:12 +0000
commit780c61f1ee665a70d1abb563c22b96ee43d5f78e (patch)
treed2467bb2b4d289b689375fde0ef22ef7d40943bb /compiler/rustc_llvm/llvm-wrapper/CoverageMappingWrapper.cpp
parent1c81105b432d5b2ae111c78ff6fba00b28e32309 (diff)
parentf9509d3574a998bbfb664c5768d183f7d2af39a9 (diff)
downloadrust-780c61f1ee665a70d1abb563c22b96ee43d5f78e.tar.gz
rust-780c61f1ee665a70d1abb563c22b96ee43d5f78e.zip
Auto merge of #13041 - Jarcho:path, r=y21
Refactor `absolute_paths`

Checks are rearranged to do the more expensive checks later. Since the most likely path length will be one (locals and imported/local items) this will exclude such paths on the first check.

Tests were rewritten as they were hard to follow (annotations would have helped), spammy (lots of tests for the same thing) and insufficient.

One thing thing that came up and should be decided on now is what to do about the difference between `path::to::Trait::item` (4 segments) and `path::to::Type::item` (3 segments). The current behaviour treats these as different lengths which is terrible. I personally think these should both be three segments since the item can't actually be imported. Only the type or the trait could be. This makes `crate_name::Trait::item` the shortest absolute path which is shorter than the lint allows by default.

changelog: None
Diffstat (limited to 'compiler/rustc_llvm/llvm-wrapper/CoverageMappingWrapper.cpp')
0 files changed, 0 insertions, 0 deletions