@@ -1057,7 +1057,7 @@ impl<'tcx> TyCtxt<'tcx> {
1057
1057
)
1058
1058
}
1059
1059
1060
- pub fn lift < T : ? Sized + Lift < ' tcx > > ( self , value : & T ) -> Option < T :: Lifted > {
1060
+ pub fn lift < T : Lift < ' tcx > > ( self , value : T ) -> Option < T :: Lifted > {
1061
1061
value. lift_to_tcx ( self )
1062
1062
}
1063
1063
@@ -1565,16 +1565,16 @@ impl<'tcx> TyCtxt<'tcx> {
1565
1565
/// e.g., `()` or `u8`, was interned in a different context.
1566
1566
pub trait Lift < ' tcx > : fmt:: Debug {
1567
1567
type Lifted : fmt:: Debug + ' tcx ;
1568
- fn lift_to_tcx ( & self , tcx : TyCtxt < ' tcx > ) -> Option < Self :: Lifted > ;
1568
+ fn lift_to_tcx ( self , tcx : TyCtxt < ' tcx > ) -> Option < Self :: Lifted > ;
1569
1569
}
1570
1570
1571
1571
macro_rules! nop_lift {
1572
1572
( $set: ident; $ty: ty => $lifted: ty) => {
1573
1573
impl <' a, ' tcx> Lift <' tcx> for $ty {
1574
1574
type Lifted = $lifted;
1575
- fn lift_to_tcx( & self , tcx: TyCtxt <' tcx>) -> Option <Self :: Lifted > {
1576
- if tcx. interners. $set. contains_pointer_to( & Interned ( * self ) ) {
1577
- Some ( unsafe { mem:: transmute( * self ) } )
1575
+ fn lift_to_tcx( self , tcx: TyCtxt <' tcx>) -> Option <Self :: Lifted > {
1576
+ if tcx. interners. $set. contains_pointer_to( & Interned ( self ) ) {
1577
+ Some ( unsafe { mem:: transmute( self ) } )
1578
1578
} else {
1579
1579
None
1580
1580
}
@@ -1587,12 +1587,12 @@ macro_rules! nop_list_lift {
1587
1587
( $set: ident; $ty: ty => $lifted: ty) => {
1588
1588
impl <' a, ' tcx> Lift <' tcx> for & ' a List <$ty> {
1589
1589
type Lifted = & ' tcx List <$lifted>;
1590
- fn lift_to_tcx( & self , tcx: TyCtxt <' tcx>) -> Option <Self :: Lifted > {
1590
+ fn lift_to_tcx( self , tcx: TyCtxt <' tcx>) -> Option <Self :: Lifted > {
1591
1591
if self . is_empty( ) {
1592
1592
return Some ( List :: empty( ) ) ;
1593
1593
}
1594
- if tcx. interners. $set. contains_pointer_to( & Interned ( * self ) ) {
1595
- Some ( unsafe { mem:: transmute( * self ) } )
1594
+ if tcx. interners. $set. contains_pointer_to( & Interned ( self ) ) {
1595
+ Some ( unsafe { mem:: transmute( self ) } )
1596
1596
} else {
1597
1597
None
1598
1598
}
0 commit comments