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