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