Closed
Description
Problem
$ cargo clippy --fix
error: failed to bind TCP listener to manage locking
Caused by:
Can't assign requested address (os error 49)
Notes
Panic arises in the diagnostic server:
cargo/src/cargo/util/diagnostic_server.rs
Line 231 in 3a18c89
This may be a bug in macOS or rust itself as this simple program fails on my platform:
$ cat > example.rs && rustc example.rs && ./example
use std::net::TcpListener;
fn main() {
let _ = TcpListener::bind("127.0.0.1:0").unwrap();
}
thread 'main' panicked at example.rs:4:44:
called `Result::unwrap()` on an `Err` value: Os { code: 49, kind: AddrNotAvailable, message: "Can't assign requested address" }
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
rust-lang/rust#123715 (comment)
Version
$ cargo version --verbose
cargo 1.78.0 (54d8815d0 2024-03-26)
release: 1.78.0
commit-hash: 54d8815d04fa3816edc207bbc4dd36bf18014dbc
commit-date: 2024-03-26
host: aarch64-apple-darwin
libgit2: 1.7.2 (sys:0.18.2 vendored)
libcurl: 8.4.0 (sys:0.4.72+curl-8.6.0 system ssl:(SecureTransport) LibreSSL/3.3.6)
ssl: OpenSSL 1.1.1w 11 Sep 2023
os: Mac OS 14.4.0 [64-bit]