diff options
| author | Dylan DPC <dylan.dpc@gmail.com> | 2020-12-21 02:47:50 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-12-21 02:47:50 +0100 |
| commit | 823210901d1664dee1e78e2b37b95488341c5075 (patch) | |
| tree | 62e41fa45dc8a1f4252d34e970975e9a9279b5a8 /compiler/rustc_llvm/llvm-wrapper/Linker.cpp | |
| parent | c4b34eebefc79d01d75efea0f5159b22a35891cf (diff) | |
| parent | 60d55671602fcff089a7b9199608a1b397877836 (diff) | |
| download | rust-823210901d1664dee1e78e2b37b95488341c5075.tar.gz rust-823210901d1664dee1e78e2b37b95488341c5075.zip | |
Rollup merge of #80244 - jyn514:spans, r=bugadani
Cleanup markdown span handling 1. 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 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. 2. Remove unnecessary scope in `markdown_links` I recommend reading a single commit at a time. cc ``@bugadani`` - this will conflict with https://github.com/rust-lang/rust/pull/77859, I'll try to make sure that gets merged first.
Diffstat (limited to 'compiler/rustc_llvm/llvm-wrapper/Linker.cpp')
0 files changed, 0 insertions, 0 deletions
