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