File tree Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -1714,6 +1714,10 @@ impl<'a, 'tcx> Lift<'tcx> for &'a List<Goal<'a>> {
1714
1714
& self ,
1715
1715
tcx : TyCtxt < ' b , ' gcx , ' tcx > ,
1716
1716
) -> Option < & ' tcx List < Goal < ' tcx > > > {
1717
+ if self . is_empty ( ) {
1718
+ return Some ( List :: empty ( ) ) ;
1719
+ }
1720
+
1717
1721
if tcx. interners . arena . in_arena ( * self as * const _ ) {
1718
1722
return Some ( unsafe { mem:: transmute ( * self ) } ) ;
1719
1723
}
@@ -1732,6 +1736,10 @@ impl<'a, 'tcx> Lift<'tcx> for &'a List<Clause<'a>> {
1732
1736
& self ,
1733
1737
tcx : TyCtxt < ' b , ' gcx , ' tcx > ,
1734
1738
) -> Option < & ' tcx List < Clause < ' tcx > > > {
1739
+ if self . is_empty ( ) {
1740
+ return Some ( List :: empty ( ) ) ;
1741
+ }
1742
+
1735
1743
if tcx. interners . arena . in_arena ( * self as * const _ ) {
1736
1744
return Some ( unsafe { mem:: transmute ( * self ) } ) ;
1737
1745
}
You can’t perform that action at this time.
0 commit comments