Skip to content
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

Add PartialOrd and Ord implementation for std::net::SocketAddr #53863

Closed
wants to merge 2 commits into from
Closed

Add PartialOrd and Ord implementation for std::net::SocketAddr #53863

wants to merge 2 commits into from

Conversation

In-line
Copy link
Contributor

@In-line In-line commented Aug 31, 2018

Fixes #53710 continuation of #53788

@rust-highfive
Copy link
Collaborator

Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @kennytm (or someone else) soon.

If any changes to this PR are deemed necessary, please add them as extra commits. This ensures that the reviewer can see what has changed since they last reviewed the code. Due to the way GitHub handles out-of-date commits, this should also make it reasonably obvious what issues have or haven't been addressed. Large or tricky changes may require several passes of review and changes.

Please see the contribution instructions for more information.

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Aug 31, 2018
@rust-highfive
Copy link
Collaborator

The job x86_64-gnu-llvm-5.0 of your PR failed on Travis (raw log). Through arcane magic we have determined that the following fragments from the build log may contain information about the problem.

Click to expand the log.

I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact @TimNN. (Feature Requests)

@In-line In-line closed this Aug 31, 2018
@rust-highfive
Copy link
Collaborator

The job x86_64-gnu-llvm-5.0 of your PR failed on Travis (raw log). Through arcane magic we have determined that the following fragments from the build log may contain information about the problem.

Click to expand the log.
[00:05:57]    Compiling alloc v0.0.0 (file:///checkout/src/liballoc)
[00:05:58]    Compiling alloc_system v0.0.0 (file:///checkout/src/liballoc_system)
[00:05:58]    Compiling panic_abort v0.0.0 (file:///checkout/src/libpanic_abort)
[00:06:02]    Compiling panic_unwind v0.0.0 (file:///checkout/src/libpanic_unwind)
[00:06:05] error[E0277]: can't compare `libc::sockaddr_in` with `_`
[00:06:05]    |
[00:06:05]    |
[00:06:05] 86 | pub struct SocketAddrV4 { inner: c::sockaddr_in }
[00:06:05]    |                           ^^^^^^^^^^^^^^^^^^^^^ no implementation for `libc::sockaddr_in < _` and `libc::sockaddr_in > _`
[00:06:05]    |
[00:06:05]    = help: the trait `core::cmp::PartialOrd<_>` is not implemented for `libc::sockaddr_in`
[00:06:05]    = note: required by `core::cmp::PartialOrd::partial_cmp`
[00:06:05] 
[00:06:05] error[E0277]: the trait bound `libc::sockaddr_in: core::cmp::Ord` is not satisfied
[00:06:05]    |
[00:06:05]    |
[00:06:05] 86 | pub struct SocketAddrV4 { inner: c::sockaddr_in }
[00:06:05]    |                           ^^^^^^^^^^^^^^^^^^^^^ the trait `core::cmp::Ord` is not implemented for `libc::sockaddr_in`
[00:06:05]    = note: required by `test/tools
31632 ./.git/modules/src/tools/lld/objects
31624 ./.git/modules/src/tools/lld/objects/pack
30300 ./src/llvm/test/Transforms

I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact @TimNN. (Feature Requests)

@In-line In-line deleted the patch-1 branch January 26, 2019 15:06
Dylan-DPC-zz pushed a commit to Dylan-DPC-zz/rust that referenced this pull request May 29, 2020
Implement PartialOrd and Ord for SocketAddr*

The implementation is mostly the same as the one found in `IpAddr` (other than adding comparison for ports, of course).
Continues rust-lang#53788 and rust-lang#53863
Fixes rust-lang#53710
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-review Status: Awaiting review from the assignee but also interested parties.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants