Skip to content

Commit 64e196b

Browse files
Let define_proc_macros! handle early returns.
1 parent 0eadf78 commit 64e196b

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

procedural-masquerade/lib.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,10 @@ macro_rules! define_proc_macros {
176176
-> ::proc_macro::TokenStream {
177177
let $input = derive_input.to_string();
178178
let $input = $crate::_extract_input(&$input);
179-
$body.parse().unwrap()
179+
fn wrapper($input: &str) -> String {
180+
$body
181+
}
182+
wrapper($input).parse().unwrap()
180183
}
181184
)+
182185
}

0 commit comments

Comments
 (0)