We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 0581060 commit 14668f2Copy full SHA for 14668f2
src/libstd/io/mod.rs
@@ -81,13 +81,18 @@ Some examples of obvious things you might want to do
81
82
* Make a simple TCP client connection and request
83
84
- ```rust,should_fail
+ ```rust
85
# #![allow(unused_must_use)]
86
use std::io::net::tcp::TcpStream;
87
88
+ # // connection doesn't fail if a server is running on 8080
89
+ # // locally, we still want to be type checking this code, so lets
90
+ # // just stop it running (#11576)
91
+ # if false {
92
let mut socket = TcpStream::connect("127.0.0.1", 8080).unwrap();
93
socket.write(bytes!("GET / HTTP/1.0\n\n"));
94
let response = socket.read_to_end();
95
+ # }
96
```
97
98
* Make a simple TCP server
0 commit comments