]> git.lizzy.rs Git - rust.git/commit
Avoid a `clone()` in `transcribe()`.
authorNicholas Nethercote <nnethercote@mozilla.com>
Fri, 15 Feb 2019 01:36:10 +0000 (12:36 +1100)
committerNicholas Nethercote <nnethercote@mozilla.com>
Sun, 17 Feb 2019 22:46:33 +0000 (09:46 +1100)
commitf0d8fbd283654479c50a2fec94bf2362eed0f189
treec0d4e7c81585478c7da752728c571eed8aca9531
parentf8801f3bf641f0277087e6621d09f9a6a373b36c
Avoid a `clone()` in `transcribe()`.

The current code (expensively) clones the value within an `Rc`. This
commit changes things so that the `Rc` itself is (cheaply) cloned
instead, avoid some allocations.

This requires converting a few `Rc` instances to `Lrc`.
src/libsyntax/ext/tt/macro_parser.rs
src/libsyntax/ext/tt/transcribe.rs