From 0a27f89d799b8635e63b93085b5a9c7f19f8476a Mon Sep 17 00:00:00 2001 From: Teoh Han Hui Date: Sat, 25 Dec 2021 18:08:28 +0800 Subject: [PATCH] Fix macro hygiene in wasm_bindgen_test Specifically, use fully qualified path for `concat!` macro. --- crates/test-macro/src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/test-macro/src/lib.rs b/crates/test-macro/src/lib.rs index 0fdb7aeddd6..c0aa3636c8a 100644 --- a/crates/test-macro/src/lib.rs +++ b/crates/test-macro/src/lib.rs @@ -62,7 +62,7 @@ pub fn wasm_bindgen_test( (quote! { #[no_mangle] pub extern "C" fn #name(cx: &::wasm_bindgen_test::__rt::Context) { - let test_name = concat!(module_path!(), "::", stringify!(#ident)); + let test_name = ::std::concat!(::std::module_path!(), "::", ::std::stringify!(#ident)); #test_body } })