Skip to content

Commit b67248e

Browse files
committed
procedural-masquerade: Give more stack to procedural-masquerade macros.
1 parent ad39746 commit b67248e

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

procedural-masquerade/lib.rs

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -177,8 +177,15 @@ macro_rules! define_proc_macros {
177177
fn wrapped($input: &str) -> String {
178178
$body
179179
}
180+
181+
// syn uses a huge amount of stack in debug mode.
180182
let derive_input_string = derive_input.to_string();
181-
wrapped($crate::_extract_input(&derive_input_string)).parse().unwrap()
183+
let handle =
184+
::std::thread::Builder::new().stack_size(128 * 1024 * 1024).spawn(move || {
185+
wrapped($crate::_extract_input(&derive_input_string))
186+
}).unwrap();
187+
188+
handle.join().unwrap().parse().unwrap()
182189
}
183190
)+
184191
}

0 commit comments

Comments
 (0)