You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Building and testing with option --no-default-features fails like this:
81s --> src/events.rs:14:5
81s |
81s 14 | use tokio::sync::mpsc;
81s | ^^^^^ use of undeclared crate or module `tokio`
81s
81s error[E0433]: failed to resolve: use of undeclared crate or module `tokio`
81s --> src/reader.rs:14:5
81s |
81s 14 | use tokio::fs::{metadata, File};
81s | ^^^^^ use of undeclared crate or module `tokio`
81s
81s error[E0433]: failed to resolve: use of undeclared crate or module `tokio`
81s --> src/reader.rs:15:5
81s |
81s 15 | use tokio::io::{AsyncBufReadExt, AsyncSeekExt, BufReader, Lines};
81s | ^^^^^ use of undeclared crate or module `tokio`
81s
81s error[E0599]: no method named `poll_next_line` found for struct `Pin<_>` in the current scope
81s --> src/reader.rs:270:63
81s |
81s 270 | ... let res = ready!(Pin::new(reader).poll_next_line(cx));
81s | ^^^^^^^^^^^^^^ method not found in `Pin<_>`
81s
81s error[E0277]: the size for values of type `dyn futures_util::Future<Output = Result<std::fs::Metadata, std::io::Error>> + Send + Sync` cannot be known at compilation time
81s --> src/reader.rs:484:53
81s |
81s 484 | let metadata_fut = Box::pin(metadata(path.clone()));
81s | -------- ^^^^^^^^^^^^^^^^^^^^^^ doesn't have a size known at compile-time
81s | |
81s | required by a bound introduced by this call
81s |
81s = help: the trait `Sized` is not implemented for `dyn futures_util::Future<Output = Result<std::fs::Metadata, std::io::Error>> + Send + Sync`
81s note: required by a bound in `Box::<T>::pin`
81s
81s Some errors have detailed explanations: E0277, E0433, E0599.
81s For more information about an error, try `rustc --explain E0277`.
81s error: could not compile `linemux` due to 5 previous errors
The text was updated successfully, but these errors were encountered:
Thanks for the report. It's somewhat moot right now since tokio is currently the only supported runtime, but this error is due to the overall desire to support other runtimes like async-std, and cargo's inability to declare that exactly one feature of a set is enabled at build time (likely rust-lang/cargo#2980).
Looking at how sqlx handles this, they expose various facades which panic on execution if no runtime is set (example). That may be a specific design decision, since it should be possible to fail at compile time via compile_error!.
Building and testing with option
--no-default-features
fails like this:The text was updated successfully, but these errors were encountered: