From 6dafc3a9c7b75b46bd76c5679956522ae1b33c10 Mon Sep 17 00:00:00 2001 From: fw Date: Thu, 5 Sep 2024 16:15:57 -0400 Subject: [PATCH] transpile: don't assume macro invocations are whitespace-free --- c2rust-transpile/src/translator/mod.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/c2rust-transpile/src/translator/mod.rs b/c2rust-transpile/src/translator/mod.rs index 6c32f7cf68..10ba422ee2 100644 --- a/c2rust-transpile/src/translator/mod.rs +++ b/c2rust-transpile/src/translator/mod.rs @@ -4012,7 +4012,7 @@ impl<'c> Translation<'c> { text: &str, ) -> Option>> { let mut split = text.splitn(2, '('); - let ident = split.next()?; + let ident = split.next()?.trim(); let args = split.next()?.trim_end_matches(')'); let ts: TokenStream = syn::parse_str(args).ok()?;