syn icon indicating copy to clipboard operation
syn copied to clipboard

Document that parse_quote should not be called in a loop where previous output is interpolated into the next invocation

Open dtolnay opened this issue 7 years ago • 0 comments

This can result in quadratic behavior as each interpolated value is flattened to tokens before being parsed again.

for ... {
    let x = parse_quote! { ... #x ... };
}

dtolnay avatar Dec 03 '18 23:12 dtolnay