about summary refs log tree commit diff
path: root/tests/rustdoc/source-code-pages/source-code-highlight.rs
diff options
context:
space:
mode:
authorMatthias Krüger <476013+matthiaskrgr@users.noreply.github.com>2025-05-02 19:37:56 +0200
committerGitHub <noreply@github.com>2025-05-02 19:37:56 +0200
commita2ae171b97741ebf1f7c3e7a1ca118faa91d6662 (patch)
tree752e491ecefb5bbfc86e98925ae0e6f671dad531 /tests/rustdoc/source-code-pages/source-code-highlight.rs
parent7c96085b64580af5c5f619384f0e3f082138ff13 (diff)
parentd9c060b88be29569e615496e20bdcf8ecdf780f8 (diff)
downloadrust-a2ae171b97741ebf1f7c3e7a1ca118faa91d6662.tar.gz
rust-a2ae171b97741ebf1f7c3e7a1ca118faa91d6662.zip
Rollup merge of #140485 - Jarcho:from_expansion_opt, r=petrochenkov
Optimize the codegen for `Span::from_expansion`

See https://godbolt.org/z/bq65Y6bc4 for the difference. the new version is less than half the number of instructions.

Also tried fully writing the function by hand:
```rust
sp.ctxt_or_parent_or_marker != 0
        && (
            sp.len_with_tag_or_marker == BASE_LEN_INTERNED_MARKER
            || sp.len_with_tag_or_marker & PARENT_TAG == 0
        )
```

But that was no better than this PR's current use of `match_span_kind`.
Diffstat (limited to 'tests/rustdoc/source-code-pages/source-code-highlight.rs')
0 files changed, 0 insertions, 0 deletions