Optimize CStr backing slice bounds checks - #161040
Open
SomeFlyingThing wants to merge 1 commit into
Open
Conversation
Collaborator
|
r? @fee1-dead rustbot has assigned @fee1-dead. Use Why was this reviewer chosen?The reviewer was selected based on:
|
Member
|
Yup, the safety invariants of @bors r+ |
Contributor
jhpratt
added a commit
to jhpratt/rust
that referenced
this pull request
Aug 13, 2026
…n-hints, r=joboet Optimize CStr backing slice bounds checks Hint that Cstr is non empty bcs it always contains the null byte. Byte-zero access reduces from 27 to 4 bytes
rust-bors Bot
pushed a commit
that referenced
this pull request
Aug 13, 2026
Rollup of 14 pull requests Successful merges: - #158918 (x86_64-win: Enable f128 on LLVM 23+) - #160288 (rustdoc: use anonymous constant for primitives/keywords/attribute docs) - #160440 (Couple of misc improvements to the unwind infrastructure) - #160441 (PowerPC inline ASM: Fix scalar floats being in the wrong vector lane on little endian) - #160896 (tidy: Update Python version requirements to 3.11) - #160972 (std: map ERROR_NEGATIVE_SEEK to ErrorKind::InvalidInput on Windows) - #161040 (Optimize CStr backing slice bounds checks) - #158885 (Add `core::num::Complex`) - #160928 (check `mut`-restriction when tuple constructor is used as a value) - #161002 (disallow `#[cold]` on `extern "custom"` functions) - #161016 (Fix invalid suggestion from try unlabled block) - #161020 (io: Use `NonNull` for all `Custom` API related to `Box`, update documentation for `Custom`) - #161044 (rustc-dev-guide subtree update) - #161046 (Enable unrolling feature of bors)
JonathanBrouwer
added a commit
to JonathanBrouwer/rust
that referenced
this pull request
Aug 13, 2026
…n-hints, r=joboet Optimize CStr backing slice bounds checks Hint that Cstr is non empty bcs it always contains the null byte. Byte-zero access reduces from 27 to 4 bytes
rust-bors Bot
pushed a commit
that referenced
this pull request
Aug 13, 2026
…uwer Rollup of 17 pull requests Successful merges: - #161045 (stdarch subtree update) - #157428 (allocator: refactor for stabilisation) - #158918 (x86_64-win: Enable f128 on LLVM 23+) - #160288 (rustdoc: use anonymous constant for primitives/keywords/attribute docs) - #160440 (Couple of misc improvements to the unwind infrastructure) - #160441 (PowerPC inline ASM: Fix scalar floats being in the wrong vector lane on little endian) - #160896 (tidy: Update Python version requirements to 3.11) - #160972 (std: map ERROR_NEGATIVE_SEEK to ErrorKind::InvalidInput on Windows) - #161040 (Optimize CStr backing slice bounds checks) - #160928 (check `mut`-restriction when tuple constructor is used as a value) - #160969 (give layout errors from `size_of_val` and `align_of_val` a span) - #161002 (disallow `#[cold]` on `extern "custom"` functions) - #161016 (Fix invalid suggestion from try unlabled block) - #161020 (io: Use `NonNull` for all `Custom` API related to `Box`, update documentation for `Custom`) - #161044 (rustc-dev-guide subtree update) - #161046 (Enable unrolling feature of bors) - #161054 (rustdoc: Fix link title attribute value when field of enum variants)
jhpratt
added a commit
to jhpratt/rust
that referenced
this pull request
Aug 13, 2026
…n-hints, r=joboet Optimize CStr backing slice bounds checks Hint that Cstr is non empty bcs it always contains the null byte. Byte-zero access reduces from 27 to 4 bytes
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Hint that Cstr is non empty bcs it always contains the null byte. Byte-zero access reduces from 27 to 4 bytes