Create a forever red node and use it to force side effects.

This commit is contained in:
Camille GILLOT 2022-04-27 19:18:26 +02:00
parent 682f57656e
commit 15530a1c84
5 changed files with 26 additions and 37 deletions

View file

@ -39,17 +39,6 @@ impl Key for () {
}
}
impl Key for ty::RawLocalDefId {
#[inline(always)]
fn query_crate_is_local(&self) -> bool {
true
}
fn default_span(&self, _: TyCtxt<'_>) -> Span {
DUMMY_SP
}
}
impl<'tcx> Key for ty::InstanceDef<'tcx> {
#[inline(always)]
fn query_crate_is_local(&self) -> bool {