diff options
| author | Nicholas Nethercote <nnethercote@mozilla.com> | 2020-01-31 08:45:57 +1100 |
|---|---|---|
| committer | Nicholas Nethercote <nnethercote@mozilla.com> | 2020-02-10 08:55:34 +1100 |
| commit | 7426853ba255940b880f2e7f8026d60b94b42404 (patch) | |
| tree | 3fd4f6e957b91db962536b680edcb3f5eec792b1 /src/test/codegen/src-hash-algorithm/src-hash-algorithm-md5.rs | |
| parent | a19edd6b161521a4f66716b3b45b8cf4d3f03f3a (diff) | |
| download | rust-7426853ba255940b880f2e7f8026d60b94b42404.tar.gz rust-7426853ba255940b880f2e7f8026d60b94b42404.zip | |
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.
Diffstat (limited to 'src/test/codegen/src-hash-algorithm/src-hash-algorithm-md5.rs')
0 files changed, 0 insertions, 0 deletions
