rust/library/core/src/net
Matthias Krüger 845c414fae
Rollup merge of #116714 - WaffleLapkin:order-the-order, r=joshtriplett
Derive `Ord`, `PartialOrd` and `Hash` for `SocketAddr*`

Fixes #116711

The main pain of this PR is to fix the buggy impl of `Ord` for `SocketAddrV6`, which ignored half of the fields (while `PartialEq` is derived):
4603f0b8af/library/core/src/net/socket_addr.rs (L99-L106)

4603f0b8af/library/core/src/net/socket_addr.rs (L676)

For me it looks like a simple copy-paste error made in https://github.com/rust-lang/rust/pull/72239 (copy from v4 impl) (cc `@hch12907),` as I don't see this behavior being mentioned anywhere on the PR and it also does not respect `cmp` trait "rules". I also do not see any reasons for those impls to _not_ be derived.

It's a shame we did not notice this for 28 versions/3 years. I guess this is a bug fix, but I'm not sure what the process here should be.

r? libs
2023-10-24 19:29:54 +02:00
..
display_buffer.rs Move IpAddr and SocketAddr to core 2023-02-26 13:50:08 +01:00
ip_addr.rs Rollup merge of #115955 - tgross35:ip-to-canonical, r=dtolnay 2023-10-16 06:26:20 +02:00
mod.rs Add tracking issue 2023-02-26 13:50:10 +01:00
parser.rs remove some unneeded imports 2023-04-12 19:27:18 +02:00
socket_addr.rs Derive Ord, PartialOrd and Hash for SocketAddr* 2023-10-14 00:48:22 +00:00