Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Optimize string handling in lit_token().
In the common case, the string value in a string literal Token is the same as the string value in a string literal LitKind. (The exception is when escapes or \r are involved.) This patch takes advantage of that to avoid calling str_lit() and re-interning the string in that case. This speeds up incremental builds for a few of the rustc-benchmarks, the best by 3%.
- Loading branch information