1 #![warn(rust_2018_idioms)]
2 #![cfg(feature = "full")]
3 
is_error<T: std::error::Error + Send + Sync>()4 fn is_error<T: std::error::Error + Send + Sync>() {}
5 
6 #[test]
mpsc_error_bound()7 fn mpsc_error_bound() {
8     use tokio::sync::mpsc::error;
9 
10     is_error::<error::SendError<()>>();
11     is_error::<error::TrySendError<()>>();
12 }
13 
14 #[test]
oneshot_error_bound()15 fn oneshot_error_bound() {
16     use tokio::sync::oneshot::error;
17 
18     is_error::<error::RecvError>();
19     is_error::<error::TryRecvError>();
20 }
21 
22 #[test]
watch_error_bound()23 fn watch_error_bound() {
24     use tokio::sync::watch::error;
25 
26     is_error::<error::SendError<()>>();
27 }
28