Initial fixes on top of type interner commit

This commit is contained in:
Michael Goulet
2022-05-22 12:57:46 -07:00
parent a7015fe816
commit a056a953f0
28 changed files with 171 additions and 134 deletions

View File

@@ -1744,7 +1744,7 @@ macro_rules! nop_lift {
impl<'a, 'tcx> Lift<'tcx> for $ty {
type Lifted = $lifted;
fn lift_to_tcx(self, tcx: TyCtxt<'tcx>) -> Option<Self::Lifted> {
if tcx.interners.$set.contains_pointer_to(&InternedInSet(self.0.0)) {
if tcx.interners.$set.contains_pointer_to(&InternedInSet(&*self.0.0)) {
// SAFETY: `self` is interned and therefore valid
// for the entire lifetime of the `TyCtxt`.
Some(unsafe { mem::transmute(self) })