about summary refs log tree commit diff
path: root/compiler/rustc_codegen_llvm/src/llvm_util.rs
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2024-09-24 11:01:05 +0000
committerbors <bors@rust-lang.org>2024-09-24 11:01:05 +0000
commitceb495a4d01d2e72e6c4e751ae89387fc45f2223 (patch)
tree7e913ef4c2f92d516981745e456a2cd0b53300f8 /compiler/rustc_codegen_llvm/src/llvm_util.rs
parenta5f028b595b7066803ead92618e41fd56fb1766b (diff)
parentb14cd717dc388fea1f57989e02c7ac1fa4317659 (diff)
downloadrust-ceb495a4d01d2e72e6c4e751ae89387fc45f2223.tar.gz
rust-ceb495a4d01d2e72e6c4e751ae89387fc45f2223.zip
Auto merge of #18166 - ChayimFriedman2:dollar-crate-root, r=Veykril
fix: Fix a bug in span map merge, and add explanations of how span maps are stored

Because it took me hours to figure out that contrary to common sense, the offset stored is the *end* of the node, and we search by the *start*. Which is why we need a convoluted `partition_point()` instead of a simple `binary_search()`. And this was not documented at all. Which made me make mistakes with my implementation of `SpanMap::merge()`.

The other bug fixed about span map merging is correctly keeping track of the current offset in presence of multiple sibling macro invocations. Unrelated, but because of the previous issue it took me hours to debug, so I figured out I'll put them together for posterity.

Fixes #18163.
Diffstat (limited to 'compiler/rustc_codegen_llvm/src/llvm_util.rs')
0 files changed, 0 insertions, 0 deletions