]> git.lizzy.rs Git - rust.git/blob - src/test/ui/span/issue-33884.rs
Rollup merge of #87922 - Manishearth:c-enum-target-spec, r=nagisa,eddyb
[rust.git] / src / test / ui / span / issue-33884.rs
1 use std::net::TcpListener;
2 use std::net::TcpStream;
3 use std::io::{self, Read, Write};
4
5 fn handle_client(stream: TcpStream) -> io::Result<()> {
6     stream.write_fmt(format!("message received"))
7     //~^ ERROR mismatched types
8 }
9
10 fn main() {
11     if let Ok(listener) = TcpListener::bind("127.0.0.1:8080") {
12         for incoming in listener.incoming() {
13             if let Ok(stream) = incoming {
14                 handle_client(stream);
15             }
16         }
17     }
18 }