Uh oh!
There was an error while loading. Please reload this page.
Consolidate some duplicate code in the sys modules. - #75749
Conversation
rust-highfive
commented
Aug 20, 2020
r? @sfackler (rust_highfive has picked a reviewer for you, use r? to override) |
ehuss
commented
Aug 20, 2020
cc @alexcrichton modifies wasi |
jethrogb
left a comment
There was a problem hiding this comment.
Thanks for the ping! LGTM modulo one comment. Also I assume if we do ever implement (parts) of these APIs we can just (partially) undo this change.
There was a problem hiding this comment.
It seems a little strange to pull the IoSlice types from somewhere with “unsupported” in the name, as these types are actually used and supported on this target.
There was a problem hiding this comment.
Yea, good point. I can't think of a good place to put this module, since there isn't a location for "basic implementation that is not Unix". Would it make sense to add a sys::basic module that contained code like this? The only other "functional" code in the unsupported tree is:
bors
commented
Sep 3, 2020
☔ The latest upstream changes (presumably #75971) made this pull request unmergeable. Please resolve the merge conflicts. |
ehuss
commented
Sep 10, 2020
@sfackler do you think you'll be able to review this? |
Dylan-DPC-zz
commented
Sep 15, 2020
merging this given that there was one approval even though not from the reviewer. @bors r=sfackler |
bors
commented
Sep 15, 2020
📌 Commit 90b941d05147a81a8236365bcf380e01f20a3ed1 has been approved by |
bors
commented
Sep 15, 2020
⌛ Testing commit 90b941d05147a81a8236365bcf380e01f20a3ed1 with merge 7ee2bd15797d69501f36b94f083f18031d11893c... |
bors
commented
Sep 15, 2020
💔 Test failed - checks-actions |
jethrogb
commented
Sep 15, 2020
|
ehuss
commented
Sep 15, 2020
Not sure how I missed that attribute, I thought I had tested it. @bors r=alexcrichton |
bors
commented
Sep 15, 2020
📌 Commit 25cca07 has been approved by |
Rollup of 10 pull requests Successful merges: - rust-lang#73955 (deny(unsafe_op_in_unsafe_fn) in libstd/process.rs) - rust-lang#75146 (Detect overflow in proc_macro_server subspan) - rust-lang#75304 (Note when a a move/borrow error is caused by a deref coercion) - rust-lang#75749 (Consolidate some duplicate code in the sys modules.) - rust-lang#75882 (Use translated variable for test string) - rust-lang#75886 (Test that bounds checks are elided for [..index] after .position()) - rust-lang#76048 (Initial support for riscv32gc_unknown_linux_gnu) - rust-lang#76198 (Make some Ordering methods const) - rust-lang#76689 (Upgrade to pulldown-cmark 0.8.0) - rust-lang#76763 (Update cargo) Failed merges: r? `@ghost`
This consolidates some modules which were duplicated throughout the sys module. The intent is to make it easier to update and maintain this code. This mainly affects the wasi, sgx, and "unsupported" targets.
I explicitly skipped hermit, cloudabi, and vxworks. These tier-3 targets have copied large sections of the sys tree. I don't think they should have, but I don't want to put effort into changing them. It also doesn't help that there aren't any scripts or instructions for building them.
There are still sections of duplicate code here and there, but this PR covers the easy parts where entire modules are the same.