Commit 202499f
authored
Rollup merge of rust-lang#73304 - dtolnay:socketeq, r=Mark-Simulacrum
Revert heterogeneous SocketAddr PartialEq impls
Originally added in rust-lang#72239.
These lead to inference regressions (mostly in tests) in code that looks like:
```rust
let socket = SocketAddrV4::new(Ipv4Addr::new(127, 0, 0, 1), 8080);
assert_eq!(socket, "127.0.0.1:8080".parse().unwrap());
```
That compiles as of stable 1.44.0 but fails in beta with:
```console
error[E0284]: type annotations needed
--> src/main.rs:3:41
|
3 | assert_eq!(socket, "127.0.0.1:8080".parse().unwrap());
| ^^^^^ cannot infer type for type parameter `F` declared on the associated function `parse`
|
= note: cannot satisfy `<_ as std::str::FromStr>::Err == _`
help: consider specifying the type argument in the method call
|
3 | assert_eq!(socket, "127.0.0.1:8080".parse::<F>().unwrap());
|
```
Closes rust-lang#73242.1 file changed
+5
-40
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
694 | 694 | | |
695 | 695 | | |
696 | 696 | | |
697 | | - | |
698 | | - | |
699 | | - | |
700 | | - | |
701 | | - | |
702 | | - | |
703 | | - | |
704 | | - | |
705 | | - | |
706 | | - | |
707 | | - | |
708 | | - | |
709 | | - | |
710 | | - | |
711 | | - | |
712 | | - | |
713 | | - | |
714 | | - | |
715 | | - | |
716 | | - | |
717 | | - | |
718 | | - | |
719 | | - | |
720 | | - | |
721 | | - | |
722 | | - | |
723 | | - | |
724 | | - | |
725 | | - | |
726 | | - | |
727 | | - | |
728 | | - | |
729 | | - | |
730 | | - | |
731 | | - | |
732 | | - | |
733 | 697 | | |
734 | 698 | | |
735 | 699 | | |
| |||
1242 | 1206 | | |
1243 | 1207 | | |
1244 | 1208 | | |
1245 | | - | |
1246 | | - | |
1247 | 1209 | | |
1248 | 1210 | | |
1249 | | - | |
1250 | | - | |
1251 | 1211 | | |
1252 | 1212 | | |
1253 | 1213 | | |
| |||
1268 | 1228 | | |
1269 | 1229 | | |
1270 | 1230 | | |
| 1231 | + | |
| 1232 | + | |
| 1233 | + | |
| 1234 | + | |
| 1235 | + | |
1271 | 1236 | | |
1272 | 1237 | | |
0 commit comments