diff options
| author | David Tolnay <dtolnay@gmail.com> | 2020-06-12 22:12:45 -0700 |
|---|---|---|
| committer | David Tolnay <dtolnay@gmail.com> | 2020-06-12 22:13:55 -0700 |
| commit | c45231ca555950cea450ba65f9d2d1962e3af6cd (patch) | |
| tree | a05209f5e39d304c54c8c466fe307ea00acd84e8 /src/test/rustdoc/codeblock-title.rs | |
| parent | 1fb612bd15bb3ef098fd24c20d0727de573b4410 (diff) | |
| download | rust-c45231ca555950cea450ba65f9d2d1962e3af6cd.tar.gz rust-c45231ca555950cea450ba65f9d2d1962e3af6cd.zip | |
Revert heterogeneous SocketAddr PartialEq impls
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());
|
Diffstat (limited to 'src/test/rustdoc/codeblock-title.rs')
0 files changed, 0 insertions, 0 deletions
