Module store

Source
Expand description

This module helps at store bodies to avoid stealing. rustc_data_structures::steal::Steal is a box for which the content can be stolen, for performance reasons. The query system of Rust creates and steal such boxes, resulting in hax trying to borrow the value of a Steal while some query stole it already. This module provides an ad-hoc global cache and query overrides to deal with this issue.

Constants§

MIR_BUILT 🔒
THIR_BODY 🔒

Traits§

SafeTyCtxtBodies

Functions§

override_queries_store_body
Register overrides for rustc queries. This will clone and store bodies for THIR and MIR (built) in an ad-hoc global cache.