@@ -1057,7 +1057,7 @@ impl<'tcx> TyCtxt<'tcx> {
10571057 )
10581058 }
10591059
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 > {
10611061 value. lift_to_tcx ( self )
10621062 }
10631063
@@ -1565,16 +1565,16 @@ impl<'tcx> TyCtxt<'tcx> {
15651565/// e.g., `()` or `u8`, was interned in a different context.
15661566pub trait Lift < ' tcx > : fmt:: Debug {
15671567 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 > ;
15691569}
15701570
15711571macro_rules! nop_lift {
15721572 ( $set: ident; $ty: ty => $lifted: ty) => {
15731573 impl <' a, ' tcx> Lift <' tcx> for $ty {
15741574 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 ) } )
15781578 } else {
15791579 None
15801580 }
@@ -1587,12 +1587,12 @@ macro_rules! nop_list_lift {
15871587 ( $set: ident; $ty: ty => $lifted: ty) => {
15881588 impl <' a, ' tcx> Lift <' tcx> for & ' a List <$ty> {
15891589 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 > {
15911591 if self . is_empty( ) {
15921592 return Some ( List :: empty( ) ) ;
15931593 }
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 ) } )
15961596 } else {
15971597 None
15981598 }
0 commit comments