Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/libnative/io/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ fn unimpl() -> IoError {
IoError {
code: ERROR as uint,
extra: 0,
detail: None,
detail: Some("not yet supported by the `native` runtime, maybe try `green`.".to_string()),
}
}

Expand Down
7 changes: 6 additions & 1 deletion src/libstd/io/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -81,13 +81,18 @@ Some examples of obvious things you might want to do

* Make a simple TCP client connection and request

```rust,should_fail
```rust
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Another possibility would be no_run which just runs the analysis passes (no need to change, just an option).

# #![allow(unused_must_use)]
use std::io::net::tcp::TcpStream;

# // connection doesn't fail if a server is running on 8080
# // locally, we still want to be type checking this code, so lets
# // just stop it running (#11576)
# if false {
let mut socket = TcpStream::connect("127.0.0.1", 8080).unwrap();
socket.write(bytes!("GET / HTTP/1.0\n\n"));
let response = socket.read_to_end();
# }
```

* Make a simple TCP server
Expand Down