]> git.lizzy.rs Git - rust.git/commit
Change `String` to `&'static str` in `ParseResult::Failure`.
authorNicholas Nethercote <nnethercote@mozilla.com>
Wed, 9 Jan 2019 04:16:19 +0000 (15:16 +1100)
committerNicholas Nethercote <nnethercote@mozilla.com>
Wed, 9 Jan 2019 04:16:19 +0000 (15:16 +1100)
commit46fa818d3443d4a62cd97be086d4d7a416b2d03e
tree676eb814d1208abb0b0fd463418f0f3e7a6f74b6
parentb92552d5578e4544006da0dd5e793a19c2149321
Change `String` to `&'static str` in `ParseResult::Failure`.

This avoids 770,000 allocations when compiling the `html5ever`
benchmark, reducing instruction counts by up to 2%.
src/libsyntax/ext/tt/macro_parser.rs
src/libsyntax/ext/tt/macro_rules.rs