diff --git a/axum/src/routing/mod.rs b/axum/src/routing/mod.rs index ee64c37ef7..13d6be7bfe 100644 --- a/axum/src/routing/mod.rs +++ b/axum/src/routing/mod.rs @@ -688,4 +688,5 @@ impl fmt::Debug for Endpoint { fn traits() { use crate::test_helpers::*; assert_send::>(); + assert_sync::>(); } diff --git a/axum/src/routing/service.rs b/axum/src/routing/service.rs index bcf9ee3bca..c604f69c0e 100644 --- a/axum/src/routing/service.rs +++ b/axum/src/routing/service.rs @@ -163,3 +163,10 @@ where } } } + +#[test] +#[allow(warnings)] +fn traits() { + use crate::test_helpers::*; + assert_sync::>(); +}