about summary refs log tree commit diff
path: root/library/std/src/os/unix/net/stream.rs
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2025-05-16 05:45:37 +0000
committerbors <bors@rust-lang.org>2025-05-16 05:45:37 +0000
commitc79bbfab78dcb0a72aa3b2bc35c00334b58bfe2e (patch)
treed6f39db82b528e67936230e39ad6c460d8904977 /library/std/src/os/unix/net/stream.rs
parent7e19eef048ba58c28c70afbf5f95da4829c15796 (diff)
parent5ce27f572ff4a5ba50146dc70aa5397b24a3f20a (diff)
downloadrust-c79bbfab78dcb0a72aa3b2bc35c00334b58bfe2e.tar.gz
rust-c79bbfab78dcb0a72aa3b2bc35c00334b58bfe2e.zip
Auto merge of #141066 - matthiaskrgr:rollup-e7tyrj5, r=matthiaskrgr
Rollup of 9 pull requests

Successful merges:

 - #140791 (std: explain prefer `TryInto` over `TryFrom` when specifying traits bounds on generic function)
 - #140834 (move (or remove) some impl Trait tests)
 - #140910 (Remove `stable` attribute from wasi fs (read_exact|write_all)_at)
 - #140984 (fix doc for UnixStream)
 - #140997 (Add negative test coverage for `-Clink-self-contained` and `-Zlinker-features`)
 - #141003 (Improve ternary operator recovery)
 - #141009 (Migrate to modern datetime API)
 - #141013 (Implement methods to set STARTUPINFO flags for Command API on Windows)
 - #141026 (rustc-dev-guide subtree update)

r? `@ghost`
`@rustbot` modify labels: rollup
Diffstat (limited to 'library/std/src/os/unix/net/stream.rs')
-rw-r--r--library/std/src/os/unix/net/stream.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/library/std/src/os/unix/net/stream.rs b/library/std/src/os/unix/net/stream.rs
index 1cab04a454d..1bd3bab5e37 100644
--- a/library/std/src/os/unix/net/stream.rs
+++ b/library/std/src/os/unix/net/stream.rs
@@ -307,11 +307,11 @@ impl UnixStream {
     ///
     /// ```no_run
     /// use std::io;
-    /// use std::net::UdpSocket;
+    /// use std::os::unix::net::UnixStream;
     /// use std::time::Duration;
     ///
     /// fn main() -> std::io::Result<()> {
-    ///     let socket = UdpSocket::bind("127.0.0.1:34254")?;
+    ///     let socket = UnixStream::connect("/tmp/sock")?;
     ///     let result = socket.set_write_timeout(Some(Duration::new(0, 0)));
     ///     let err = result.unwrap_err();
     ///     assert_eq!(err.kind(), io::ErrorKind::InvalidInput);