rust/src/test/ui/traits/suggest-deferences/issue-39029.stderr

20 lines
879 B
Plaintext
Raw Normal View History

error[E0277]: the trait bound `NoToSocketAddrs: ToSocketAddrs` is not satisfied
2021-02-08 16:15:45 -06:00
--> $DIR/issue-39029.rs:16:37
|
LL | let _errors = TcpListener::bind(&bad);
| ^^^^
| |
| the trait `ToSocketAddrs` is not implemented for `NoToSocketAddrs`
| help: consider adding dereference here: `&*bad`
|
2020-06-11 21:31:49 -05:00
::: $SRC_DIR/std/src/net/tcp.rs:LL:COL
|
LL | pub fn bind<A: ToSocketAddrs>(addr: A) -> io::Result<TcpListener> {
| ------------- required by this bound in `TcpListener::bind`
|
= note: required because of the requirements on the impl of `ToSocketAddrs` for `&NoToSocketAddrs`
error: aborting due to previous error
For more information about this error, try `rustc --explain E0277`.