mirror of
https://github.com/tokio-rs/tokio.git
synced 2026-08-31 00:00:07 +02:00
sync: move into tokio crate (#1705)
A step towards collapsing Tokio sub crates into a single `tokio` crate (#1318). The sync implementation is now provided by the main `tokio` crate. Functionality can be opted out of by using the various net related feature flags.
This commit is contained in:
@@ -0,0 +1,29 @@
|
||||
#![warn(rust_2018_idioms)]
|
||||
|
||||
fn is_error<T: ::std::error::Error + Send + Sync>() {}
|
||||
|
||||
#[test]
|
||||
fn mpsc_error_bound() {
|
||||
use tokio::sync::mpsc::error;
|
||||
|
||||
is_error::<error::SendError>();
|
||||
is_error::<error::TrySendError<()>>();
|
||||
is_error::<error::UnboundedRecvError>();
|
||||
is_error::<error::UnboundedSendError>();
|
||||
is_error::<error::UnboundedTrySendError<()>>();
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn oneshot_error_bound() {
|
||||
use tokio::sync::oneshot::error;
|
||||
|
||||
is_error::<error::RecvError>();
|
||||
is_error::<error::TryRecvError>();
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn watch_error_bound() {
|
||||
use tokio::sync::watch::error;
|
||||
|
||||
is_error::<error::SendError<()>>();
|
||||
}
|
||||
Reference in New Issue
Block a user