diff options
Diffstat (limited to 'src/test/ui/span/issue-33884.rs')
-rw-r--r-- | src/test/ui/span/issue-33884.rs | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/src/test/ui/span/issue-33884.rs b/src/test/ui/span/issue-33884.rs new file mode 100644 index 000000000..5d927a5ac --- /dev/null +++ b/src/test/ui/span/issue-33884.rs @@ -0,0 +1,18 @@ +use std::net::TcpListener; +use std::net::TcpStream; +use std::io::{self, Read, Write}; + +fn handle_client(stream: TcpStream) -> io::Result<()> { + stream.write_fmt(format!("message received")) + //~^ ERROR mismatched types +} + +fn main() { + if let Ok(listener) = TcpListener::bind("127.0.0.1:8080") { + for incoming in listener.incoming() { + if let Ok(stream) = incoming { + handle_client(stream); + } + } + } +} |