Skip to content

Do not include NUL-terminator in computed length #142708

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jun 29, 2025

Conversation

Darksonn
Copy link
Contributor

@Darksonn Darksonn commented Jun 19, 2025

This PR contains just the first commit of #142579 which changes it so that the string length stored in the Location is the length of the &str rather than the length of the &CStr. Since most users will want the &str length, it seems better to optimize for that use-case.

There should be no visible changes in the behavior or API.

@Darksonn Darksonn added the A-panic Area: Panicking machinery label Jun 19, 2025
@rustbot
Copy link
Collaborator

rustbot commented Jun 19, 2025

r? @Mark-Simulacrum

rustbot has assigned @Mark-Simulacrum.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-libs Relevant to the library team, which will review and decide on the PR/issue. labels Jun 19, 2025
@rustbot
Copy link
Collaborator

rustbot commented Jun 19, 2025

Some changes occurred to the CTFE machinery

cc @RalfJung, @oli-obk, @lcnr

@Mark-Simulacrum Mark-Simulacrum added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Jun 21, 2025
@Darksonn
Copy link
Contributor Author

@rustbot ready

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Jun 23, 2025
@Mark-Simulacrum
Copy link
Member

@bors r+

@bors
Copy link
Collaborator

bors commented Jun 28, 2025

📌 Commit 6a1b7df has been approved by Mark-Simulacrum

It is now in the queue for this repository.

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Jun 28, 2025
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Jun 28, 2025
… r=Mark-Simulacrum

Do not include NUL-terminator in computed length

This PR contains just the first commit of rust-lang#142579 which changes it so that the string length stored in the `Location` is the length of the `&str` rather than the length of the `&CStr`. Since most users will want the `&str` length, it seems better to optimize for that use-case.

There should be no visible changes in the behavior or API.
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Jun 28, 2025
… r=Mark-Simulacrum

Do not include NUL-terminator in computed length

This PR contains just the first commit of rust-lang#142579 which changes it so that the string length stored in the `Location` is the length of the `&str` rather than the length of the `&CStr`. Since most users will want the `&str` length, it seems better to optimize for that use-case.

There should be no visible changes in the behavior or API.
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Jun 28, 2025
… r=Mark-Simulacrum

Do not include NUL-terminator in computed length

This PR contains just the first commit of rust-lang#142579 which changes it so that the string length stored in the `Location` is the length of the `&str` rather than the length of the `&CStr`. Since most users will want the `&str` length, it seems better to optimize for that use-case.

There should be no visible changes in the behavior or API.
bors added a commit that referenced this pull request Jun 28, 2025
Rollup of 10 pull requests

Successful merges:

 - #123476 (std::net: adding `unix_socket_exclbind` feature for solaris/illumos.)
 - #142708 (Do not include NUL-terminator in computed length)
 - #142963 (Skip unnecessary components in x64 try builds)
 - #142987 (rustdoc: show attributes on enum variants)
 - #143031 (Add windows-gnullvm hosts to the manifest)
 - #143082 (update internal `send_signal` comment)
 - #143110 (Use tidy to sort `sym::*` items)
 - #143111 (BTreeSet: remove duplicated code by reusing `from_sorted_iter`)
 - #143114 (Minor Documentation Improvements)
 - #143137 (Miri subtree update)

r? `@ghost`
`@rustbot` modify labels: rollup
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Jun 28, 2025
… r=Mark-Simulacrum

Do not include NUL-terminator in computed length

This PR contains just the first commit of rust-lang#142579 which changes it so that the string length stored in the `Location` is the length of the `&str` rather than the length of the `&CStr`. Since most users will want the `&str` length, it seems better to optimize for that use-case.

There should be no visible changes in the behavior or API.
bors added a commit that referenced this pull request Jun 28, 2025
Rollup of 10 pull requests

Successful merges:

 - #123476 (std::net: adding `unix_socket_exclbind` feature for solaris/illumos.)
 - #142708 (Do not include NUL-terminator in computed length)
 - #142963 (Skip unnecessary components in x64 try builds)
 - #142974 (Update stage0 to 1.89.0-beta.1)
 - #142987 (rustdoc: show attributes on enum variants)
 - #143031 (Add windows-gnullvm hosts to the manifest)
 - #143082 (update internal `send_signal` comment)
 - #143110 (Use tidy to sort `sym::*` items)
 - #143111 (BTreeSet: remove duplicated code by reusing `from_sorted_iter`)
 - #143114 (Minor Documentation Improvements)

r? `@ghost`
`@rustbot` modify labels: rollup
bors added a commit that referenced this pull request Jun 28, 2025
Rollup of 9 pull requests

Successful merges:

 - #123476 (std::net: adding `unix_socket_exclbind` feature for solaris/illumos.)
 - #142708 (Do not include NUL-terminator in computed length)
 - #142963 (Skip unnecessary components in x64 try builds)
 - #142987 (rustdoc: show attributes on enum variants)
 - #143031 (Add windows-gnullvm hosts to the manifest)
 - #143082 (update internal `send_signal` comment)
 - #143110 (Use tidy to sort `sym::*` items)
 - #143111 (BTreeSet: remove duplicated code by reusing `from_sorted_iter`)
 - #143114 (Minor Documentation Improvements)

r? `@ghost`
`@rustbot` modify labels: rollup

try-job: dist-i586-gnu-i586-i686-musl
bors added a commit that referenced this pull request Jun 28, 2025
Rollup of 9 pull requests

Successful merges:

 - #123476 (std::net: adding `unix_socket_exclbind` feature for solaris/illumos.)
 - #142708 (Do not include NUL-terminator in computed length)
 - #142963 (Skip unnecessary components in x64 try builds)
 - #142987 (rustdoc: show attributes on enum variants)
 - #143031 (Add windows-gnullvm hosts to the manifest)
 - #143082 (update internal `send_signal` comment)
 - #143110 (Use tidy to sort `sym::*` items)
 - #143111 (BTreeSet: remove duplicated code by reusing `from_sorted_iter`)
 - #143114 (Minor Documentation Improvements)

r? `@ghost`
`@rustbot` modify labels: rollup

try-job: dist-i586-gnu-i586-i686-musl
@bors bors merged commit c6de7ca into rust-lang:master Jun 29, 2025
10 checks passed
@rustbot rustbot added this to the 1.90.0 milestone Jun 29, 2025
rust-timer added a commit that referenced this pull request Jun 29, 2025
Rollup merge of #142708 - Darksonn:location-len-without-nul, r=Mark-Simulacrum

Do not include NUL-terminator in computed length

This PR contains just the first commit of #142579 which changes it so that the string length stored in the `Location` is the length of the `&str` rather than the length of the `&CStr`. Since most users will want the `&str` length, it seems better to optimize for that use-case.

There should be no visible changes in the behavior or API.
github-actions bot pushed a commit to rust-lang/miri that referenced this pull request Jun 29, 2025
Rollup of 9 pull requests

Successful merges:

 - rust-lang/rust#123476 (std::net: adding `unix_socket_exclbind` feature for solaris/illumos.)
 - rust-lang/rust#142708 (Do not include NUL-terminator in computed length)
 - rust-lang/rust#142963 (Skip unnecessary components in x64 try builds)
 - rust-lang/rust#142987 (rustdoc: show attributes on enum variants)
 - rust-lang/rust#143031 (Add windows-gnullvm hosts to the manifest)
 - rust-lang/rust#143082 (update internal `send_signal` comment)
 - rust-lang/rust#143110 (Use tidy to sort `sym::*` items)
 - rust-lang/rust#143111 (BTreeSet: remove duplicated code by reusing `from_sorted_iter`)
 - rust-lang/rust#143114 (Minor Documentation Improvements)

r? `@ghost`
`@rustbot` modify labels: rollup

try-job: dist-i586-gnu-i586-i686-musl
@Darksonn Darksonn deleted the location-len-without-nul branch June 29, 2025 18:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-panic Area: Panicking machinery S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-libs Relevant to the library team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants