mirror of
https://github.com/rust-lang/rust.git
synced 2025-05-11 01:17:39 +00:00
![]() 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`. |
||
---|---|---|
.. | ||
src | ||
Cargo.toml |