Error span is wrong


I know what the error is, but rustc gives a wrong span. The buf_reader.get_mut() part should have the span instead of the ::byte_stream_splitter::ByteStreamSplitter::new part. Why does rustc do this?

   --> src/
110 |         let splitter = ::byte_stream_splitter::ByteStreamSplitter::new(buf_reader.get_mut(), SPLIT);
    |                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `std::io::BufRead` is not implemented for `std::net::TcpStream`
    = note: required by `<byte_stream_splitter::ByteStreamSplitter<'a, T>>::new`

Type of buf_reader is Box<BufReader<TcpStream>> byte_stream_splitter is a crate at ( version 0.1.4 )


You should open an issue in rustc repository.