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.
A LocalDefId is equivalent to a DefId with krate == LOCAL_CRATE. Since
we encode this information in the type, we can ensure at compile time that
no DefIds from upstream crates get thrown into the mix. There are quite a
few cases where we know that only DefIds from the local crate are expected;
a DefId from a different crate would signify a bug somewhere. This
is when LocalDefId comes in handy.