dtolnay / dtolnay/syn

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

Open
#545 0 comments 0 reactions 0 assignees View on GitHub
docs
Dominant language
Rust
Stars
3.4k
Forks
374
Avg merge
1d 5h
Merged PRs (30d)
2

Description

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

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

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.