about summary refs log tree commit diff
path: root/compiler/rustc_mir_transform/src
diff options
context:
space:
mode:
authorMatthias Krüger <matthias.krueger@famsik.de>2023-10-24 19:29:54 +0200
committerGitHub <noreply@github.com>2023-10-24 19:29:54 +0200
commit845c414fae079ab3e9e61fa628de774c632c5058 (patch)
tree2baec16ac9cecf035c6c38e347fd5899f7b586db /compiler/rustc_mir_transform/src
parentf3e18e4a600782d049f41e8879048ae1f18f6351 (diff)
parent5c13c69f63dccdc637d28b403ae1fb687e0a5143 (diff)
downloadrust-845c414fae079ab3e9e61fa628de774c632c5058.tar.gz
rust-845c414fae079ab3e9e61fa628de774c632c5058.zip
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):
https://github.com/rust-lang/rust/blob/4603f0b8afb495ae56cd4c8f70d5d478d906ac54/library/core/src/net/socket_addr.rs#L99-L106

https://github.com/rust-lang/rust/blob/4603f0b8afb495ae56cd4c8f70d5d478d906ac54/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
Diffstat (limited to 'compiler/rustc_mir_transform/src')
0 files changed, 0 insertions, 0 deletions