about summary refs log tree commit diff
path: root/src/rustllvm/RustWrapper.cpp
diff options
context:
space:
mode:
authorNicholas Nethercote <nnethercote@mozilla.com>2018-11-01 05:35:20 +1100
committerNicholas Nethercote <nnethercote@mozilla.com>2018-11-01 08:43:40 +1100
commitc60ed5d22c4c2a4885fdfdfa8c6b008d79b0fc29 (patch)
tree40c66feb00cdb17c2aba10d1b641f3230b6e9cd4 /src/rustllvm/RustWrapper.cpp
parentd586d5d2f51489821b471f20959333558c24b129 (diff)
downloadrust-c60ed5d22c4c2a4885fdfdfa8c6b008d79b0fc29.tar.gz
rust-c60ed5d22c4c2a4885fdfdfa8c6b008d79b0fc29.zip
Share empty `Vec`s more within `MatcherPos::matches`.
`create_matches` creates a `Vec<Rc<Vec<NamedMatch>>>`. Even though all the
inner `Vec`s are empty, each one is created separately.

This commit changes `create_matches` so it instead creates one empty inner
`Vec`, and shares it.

The commit also changes `MatcherPos::matches` to a boxed slice, because its
length doesn't change.
Diffstat (limited to 'src/rustllvm/RustWrapper.cpp')
0 files changed, 0 insertions, 0 deletions