Skip to content

Instantly share code, notes, and snippets.

@fenhl
Created February 27, 2021 05:28
Show Gist options
  • Save fenhl/2c8cf3df287911c69ec8444f9b8ec9ab to your computer and use it in GitHub Desktop.
Save fenhl/2c8cf3df287911c69ec8444f9b8ec9ab to your computer and use it in GitHub Desktop.
build error with async_proto and tokio
[package]
name = "async-proto-min-test"
version = "0.1.0"
authors = ["Fenhl <fenhl@fenhl.net>"]
edition = "2018"
[dependencies]
serde_json = "=1.0.63"
[dependencies.async-proto]
version = "=0.5.0"
features = ["serde_json"]
[dependencies.tokio]
version = "=1.0.2"
features = ["net"]
use {
async_proto::Protocol,
serde_json::Value as Json,
tokio::net::TcpStream,
};
pub fn read(tcp_stream: TcpStream) {
let _ = Json::read(tcp_stream);
}
cargo : Compiling async-proto-min-test v0.1.0 (C:\Users\fenhl\Desktop\async-proto-min-test)
At line:1 char:1
+ cargo build 2> output.log
+ ~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: ( Compiling as...proto-min-test):String) [], RemoteException
+ FullyQualifiedErrorId : NativeCommandError
error[E0275]: overflow evaluating the requirement `Box<mio::sys::windows::InternalState>: Unpin`
|
= help: consider adding a `#![recursion_limit="256"]` attribute to your crate (`async_proto_min_test`)
= note: required because it appears within the type `Option<Box<mio::sys::windows::InternalState>>`
= note: required because it appears within the type `mio::sys::windows::IoSourceState`
= note: required because it appears within the type `mio::io_source::IoSource<std::net::TcpStream>`
= note: required because it appears within the type `mio::net::tcp::stream::TcpStream`
= note: required because it appears within the type `Option<mio::net::tcp::stream::TcpStream>`
= note: required because it appears within the type `tokio::io::poll_evented::PollEvented<mio::net::tcp::stream::TcpStream>`
= note: required because it appears within the type `tokio::net::TcpStream`
= note: required because of the requirements on the impl of `AsyncRead` for `&mut tokio::net::TcpStream`
= note: 120 redundant requirements hidden
= note: required because of the requirements on the impl of `AsyncRead` for `&mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut
&mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut
&mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut
&mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut tokio::net::TcpStream`
= note: required because of the requirements on the impl of `Future` for `tokio::io::util::read_int::ReadU8<&mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut
&mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut
&mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut
&mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut tokio::net::TcpStream>`
error: aborting due to previous error
For more information about this error, try `rustc --explain E0275`.
error: could not compile `async-proto-min-test`
To learn more, run the command again with --verbose.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment