]> git.lizzy.rs Git - rust.git/commitdiff
Auto merge of #2139 - saethlin:lazy-current-span, r=RalfJung
authorbors <bors@rust-lang.org>
Mon, 23 May 2022 06:46:46 +0000 (06:46 +0000)
committerbors <bors@rust-lang.org>
Mon, 23 May 2022 06:46:46 +0000 (06:46 +0000)
Factor current-span logic into a caching handle

After https://github.com/rust-lang/miri/pull/2030 and while working on https://github.com/rust-lang/miri/pull/1935 it became quite clear that we need to do some caching here, because some retag operations generate many calls to `log_invalidation`, and would thus search the current thread's stack _many_ times for a local crate. This caching fixes that. This handle type also has the nice benefit of tucking away all the `ThreadManager` + `CrateNum` logic.


Trivial merge