- 
                Notifications
    
You must be signed in to change notification settings  - Fork 13.9k
 
          Move os_str_bytes to sys::unix
          #86509
        
          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
Conversation
        
          
                library/std/src/sys_common/mod.rs
              
                Outdated
          
        
      There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not needed anymore, this now completely falls under the cfg logic in std::os and std::sys
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should os_str be here? Both wasi and wasm do use common::* but define os_str themselves anyway.
| 
           ☔ The latest upstream changes (presumably #86817) made this pull request unmergeable. Please resolve the merge conflicts.  | 
    
      
        
              This comment has been minimized.
        
        
      
    
  This comment has been minimized.
      
        
              This comment has been minimized.
        
        
      
    
  This comment has been minimized.
| use core::str::lossy::{Utf8Lossy, Utf8LossyChunk}; | ||
| 
               | 
          ||
| #[cfg(test)] | ||
| #[path = "../unix/os_str/tests.rs"] | 
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To avoid duplicating the test, could alternatively be cfg(unix).
| 
           Thanks! @bors r+  | 
    
| 
           📌 Commit c93cb40 has been approved by   | 
    
Rollup of 13 pull requests Successful merges: - rust-lang#86183 (Change environment variable getters to error recoverably) - rust-lang#86439 (Remove `Ipv4Addr::is_ietf_protocol_assignment`) - rust-lang#86509 (Move `os_str_bytes` to `sys::unix`) - rust-lang#86593 (Partially stabilize `const_slice_first_last`) - rust-lang#86936 (Add documentation for `Ipv6MulticastScope`) - rust-lang#87282 (Ensure `./x.py dist` adheres to `build.tools`) - rust-lang#87468 (Update rustfmt) - rust-lang#87504 (Update mdbook.) - rust-lang#87608 (Remove unused field `Session.system_library_path`) - rust-lang#87629 (Consistent spelling of "adapter" in the standard library) - rust-lang#87633 (Update compiler_builtins to fix i128 shift/mul on thumbv6m) - rust-lang#87644 (Recommend `swap_remove` in `Vec::remove` docs) - rust-lang#87653 (mark a UB doctest as no_run) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
Followup to #84967, with
OsStrExtandOsStringExtmoved out ofsys_common, there is no reason anymore foros_str_bytesto live insys_commonand not in sys. This pr moves it to the locationsys::unix::os_strand reuses the code on other platforms via#[path](as is common insys) instead of importing.