about summary refs log tree commit diff
path: root/src/test/codegen/src-hash-algorithm
diff options
context:
space:
mode:
authorDylan DPC <dylan.dpc@gmail.com>2020-02-10 01:54:15 +0100
committerGitHub <noreply@github.com>2020-02-10 01:54:15 +0100
commit8007f8468b942e689a8db771c4e76c67cdd40c3b (patch)
treef7cbf9bc9ec2abb56774b833da972a7696769668 /src/test/codegen/src-hash-algorithm
parent71c7e149e42cb0fc78a80db70d2525973311d488 (diff)
parent7426853ba255940b880f2e7f8026d60b94b42404 (diff)
downloadrust-8007f8468b942e689a8db771c4e76c67cdd40c3b.tar.gz
rust-8007f8468b942e689a8db771c4e76c67cdd40c3b.zip
Rollup merge of #68694 - nnethercote:reduce-RefCells-in-InferCtxt, r=varkor
Reduce the number of `RefCell`s in `InferCtxt`.

`InferCtxt` contains six structures within `RefCell`s. Every time we
create and dispose of (commit or rollback) a snapshot we have to
`borrow_mut` each one of them.

This commit moves the six structures under a single `RefCell`, which
gives significant speed-ups by reducing the number of `borrow_mut`
calls. To avoid runtime errors I had to reduce the lifetimes of dynamic
borrows in a couple of places.

r? @varkor
Diffstat (limited to 'src/test/codegen/src-hash-algorithm')
0 files changed, 0 insertions, 0 deletions