From 8aa58ac01952ab95cb6b1834ae5a659111c43540 Mon Sep 17 00:00:00 2001 From: Teoh Han Hui Date: Wed, 5 Jan 2022 01:18:22 +0800 Subject: [PATCH] Fix macro hygiene in wasm_bindgen_test (#2748) 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 } })