diff --git a/crates/macros/src/expand.rs b/crates/macros/src/expand.rs index 12c40a9..f89e71e 100644 --- a/crates/macros/src/expand.rs +++ b/crates/macros/src/expand.rs @@ -51,12 +51,12 @@ pub fn test(body: ItemFn, attrs: Attr) -> TokenStream { crate::attr::PathOrExpr::Path(path) => quote!(ctx.containers_mut().push({ let container = #path(&ctx).await; Box::new(container) - })), + });), crate::attr::PathOrExpr::Callable(callable) => quote!(ctx.containers_mut().push({ let container = #callable; Box::new(container) - })), + });), }); let serve = match attrs.router { diff --git a/crates/macros/tests/ui/invalid_container.stderr b/crates/macros/tests/ui/invalid_container.stderr index e7af45f..efc9c51 100644 --- a/crates/macros/tests/ui/invalid_container.stderr +++ b/crates/macros/tests/ui/invalid_container.stderr @@ -10,13 +10,13 @@ error: expected square brackets 27 | #[charted_testkit_macros::test(containers = 123)] | ^^^ -error: expected a literal string or valid path to a function +error: expected a literal string, valid path to a function, or a function call --> ./tests/ui/invalid_container.rs:32:46 | 32 | #[charted_testkit_macros::test(containers = [123])] | ^^^ -error: expected a literal string or valid path to a function +error: expected a literal string, valid path to a function, or a function call --> ./tests/ui/invalid_container.rs:37:46 | 37 | #[charted_testkit_macros::test(containers = [true])]