Extract sys::args::Args implementation to sys_common#84503
Extract sys::args::Args implementation to sys_common#84503CDirkx wants to merge 2 commits intorust-lang:masterfrom
sys::args::Args implementation to sys_common#84503Conversation
|
(rust-highfive has picked a reviewer for you, use r? to override) |
This comment has been minimized.
This comment has been minimized.
|
Edit: this has been resolved by relying on |
This comment has been minimized.
This comment has been minimized.
|
☔ The latest upstream changes (presumably #84525) made this pull request unmergeable. Please resolve the merge conflicts. |
|
☔ The latest upstream changes (presumably #84115) made this pull request unmergeable. Please resolve the merge conflicts. |
This comment has been minimized.
This comment has been minimized.
|
|
☔ The latest upstream changes (presumably #85036) made this pull request unmergeable. Please resolve the merge conflicts. |
|
☔ The latest upstream changes (presumably #84967) made this pull request unmergeable. Please resolve the merge conflicts. |
|
☔ The latest upstream changes (presumably #87580) made this pull request unmergeable. Please resolve the merge conflicts. |
|
Ping from triage: |
|
Seems reasonable to me; r=me with conflicts addressed. |
|
Ping again from triage: |
|
Closing this as inactive |
After #84413 and #84179 I have been looking into if code for
sys::args::Argscould be de-duplicated, as it was essentially the same on every platform: a wrapper type implementing!Send + !Sync + Debug + Iterator + ExactIterator + DoubleEndedIterator(although note that onwindowsandsgxthe types are currently not!Send + !Sync).This PR makes
sys::args::Argsa type alias (forvec::IntoIter/) and extracts the wrapper type toEmpty/Clone<Iter<'static>>depending on the platformsys_common.Alternatively, the wrapper type could be removed entirely and the type aliases used directly (i.e. only the first commit of this PR), since they are wrapped by
std::env::ArgsOsanyway. These type aliases are not!Send + !Sync, but I don't know how much of a problem that would be sinceArgsOsimplements!Send + !Syncexplicitly and currentlysys::windows::args::Argsandsys::sgx::args::Argsare alreadySendandSync.