about summary refs log tree commit diff
path: root/compiler/rustc_llvm/llvm-wrapper/CoverageMappingWrapper.cpp
diff options
context:
space:
mode:
authorJoshua Nelson <jyn514@gmail.com>2020-12-20 14:28:20 -0500
committerJoshua Nelson <jyn514@gmail.com>2020-12-20 15:05:41 -0500
commit65f4f39dd8d9a1c1f4a817da36c38b30e4369f9e (patch)
tree8decd9094edfb1bcdfc9d62a843f655e8083c6b4 /compiler/rustc_llvm/llvm-wrapper/CoverageMappingWrapper.cpp
parent50a90975c0f78219db45d3bee0676a22695ec103 (diff)
downloadrust-65f4f39dd8d9a1c1f4a817da36c38b30e4369f9e.tar.gz
rust-65f4f39dd8d9a1c1f4a817da36c38b30e4369f9e.zip
Get rid of `locate()` in markdown handling
This function was unfortunate for several reasons:

- It used `unsafe` because it wanted to tell whether a string came from
  the same *allocation* as another, not just whether it was a textual
  match.
- It recalculated spans even though they were already available from
  pulldown
- It sometimes *failed* to calculate the span, which meant it was always
  possible for the span to be `None`, even though in practice that
  should never happen.

This commit has several cleanups:

- Make the span required
- Pass through the span from pulldown in the `HeadingLinks` and
  `Footnotes` iterators
- Only add iterator bounds on the `impl Iterator`, not on `new` and the
  struct itself.
Diffstat (limited to 'compiler/rustc_llvm/llvm-wrapper/CoverageMappingWrapper.cpp')
0 files changed, 0 insertions, 0 deletions