()
| 29 | pub static TYPE_REF_CACHE: OnceLock<DashMap<ViewID, TypeRefCache>> = OnceLock::new(); |
| 30 | |
| 31 | pub fn register_cache_destructor() { |
| 32 | pub static mut CACHE_DESTRUCTOR: CacheDestructor = CacheDestructor; |
| 33 | #[allow(static_mut_refs)] |
| 34 | // SAFETY: This can be done as the backing data is an opaque ZST. |
| 35 | unsafe { |
| 36 | CACHE_DESTRUCTOR.register() |
| 37 | }; |
| 38 | } |
| 39 | |
| 40 | pub fn cached_function_match<F>(function: &BNFunction, f: F) -> Option<Function> |
| 41 | where |
no test coverage detected