Skip to content

[beta] Revert heterogeneous SocketAddr PartialEq impls - #73318

Closed
dtolnay wants to merge 2 commits into
rust-lang:betafrom
dtolnay:beta/socketeq
Closed

[beta] Revert heterogeneous SocketAddr PartialEq impls#73318
dtolnay wants to merge 2 commits into
rust-lang:betafrom
dtolnay:beta/socketeq

Conversation

@dtolnay

Copy link
Copy Markdown
Member

Clean backport of #73304 which is fixing the regressions in #73242.

These lead to inference regressions (mostly in tests) in code that looks
like:
let socket = std::net::SocketAddrV4::new(std::net::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:
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());
|
@rust-highfive

Copy link
Copy Markdown
Contributor

r? @withoutboats

(rust_highfive has picked a reviewer for you, use r? to override)

@rust-highfive

Copy link
Copy Markdown
Contributor

⚠️Warning⚠️

  • Pull requests are usually filed against the master branch for this repo, but this one is against beta. Please double check that you specified the right target!

@rust-highfiverust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Jun 13, 2020
@dtolnay

Copy link
Copy Markdown
MemberAuthor

r? @Mark-Simulacrum

@Mark-Simulacrum

Copy link
Copy Markdown
Member

Seems good, but I'll include it in a beta backport rollup later today so not approving this. Thanks!

@Mark-SimulacrumMark-Simulacrum mentioned this pull request Jun 13, 2020
@Mark-Simulacrum

Copy link
Copy Markdown
Member

Closing, included in #73326.

@dtolnay
dtolnay deleted the beta/socketeq branch June 14, 2020 01:39
bors added a commit to rust-lang-ci/rust that referenced this pull request Jun 15, 2020
…-morse,Mark-Simulacrum
[beta] backport
This is a beta backport rollup of the following:
* [beta] Revert heterogeneous SocketAddr PartialEq impls rust-lang#73318
* Fix emcc failure for wasm32. rust-lang#73213
* Revert rust-lang#71956rust-lang#73153
* [beta] Update cargo rust-lang#73141
* Minor: off-by-one error in RELEASES.md rust-lang#72914
* normalize adt fields during structural match checking rust-lang#72897
* Revert pr 71840 rust-lang#72989
* rust-lang/cargo#8361
* e658200 from rust-lang#72901
r? @ghost
@dtolnaydtolnay added A-io Area: `std::io`, `std::fs`, `std::net` and `std::path` T-release Relevant to the release subteam, which will review and decide on the PR/issue. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Jan 14, 2025
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-ioArea: `std::io`, `std::fs`, `std::net` and `std::path`T-releaseRelevant to the release subteam, which will review and decide on the PR/issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants

@dtolnay@rust-highfive@Mark-Simulacrum@withoutboats