- 
                Notifications
    You must be signed in to change notification settings 
- Fork 13.9k
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
            
            
          Conversation
  
    
      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
    
  
  
    
    | rustbot has assigned @Mark-Simulacrum. Use  | 
      
        
      
      
  
    5 tasks
  
| @rustbot ready | 
| @bors r+ | 
    
  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
    
  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
    
  github-actions bot
      pushed a commit
        to model-checking/verify-rust-std
      that referenced
      this pull request
    
      Jul 4, 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.
  
    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. 
  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.
  
    
  
    
This PR contains just the first commit of #142579 which changes it so that the string length stored in the
Locationis the length of the&strrather than the length of the&CStr. Since most users will want the&strlength, it seems better to optimize for that use-case.There should be no visible changes in the behavior or API.