Closed
Description
error[E0061]: this function takes 2 parameters but 1 parameter was supplied
--> src/main.rs:63:13
|
63 | std::net::SocketAddr::new(ia, 0u16)
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected 2 parameters
error: aborting due to previous error
In this case, this function
is tokio_core::net::UdpSocket::bind
, but without looking at the code no hint is given:
let sock = tokio_core::net::UdpSocket::bind(
std::net::SocketAddr::new(ia, 0u16)
).unwrap();
Originally, this function call contained a match statement to calculate the value of ia
, which caused the newline-following paren style to be used.
This appears to occur whenever both:
- using a newline-following paren style (such that the function name does not get included in the context output)
- calling a function from outside the current crate (so that it's definition is not printed)