@@ -577,14 +577,14 @@ pub struct BorrowError {
577577
578578#[ stable( feature = "try_borrow" , since = "1.13.0" ) ]
579579impl Debug for BorrowError {
580- fn fmt ( & self , f : & mut fmt:: Formatter ) -> fmt:: Result {
580+ fn fmt ( & self , f : & mut fmt:: Formatter < ' _ > ) -> fmt:: Result {
581581 f. debug_struct ( "BorrowError" ) . finish ( )
582582 }
583583}
584584
585585#[ stable( feature = "try_borrow" , since = "1.13.0" ) ]
586586impl Display for BorrowError {
587- fn fmt ( & self , f : & mut fmt:: Formatter ) -> fmt:: Result {
587+ fn fmt ( & self , f : & mut fmt:: Formatter < ' _ > ) -> fmt:: Result {
588588 Display :: fmt ( "already mutably borrowed" , f)
589589 }
590590}
@@ -597,14 +597,14 @@ pub struct BorrowMutError {
597597
598598#[ stable( feature = "try_borrow" , since = "1.13.0" ) ]
599599impl Debug for BorrowMutError {
600- fn fmt ( & self , f : & mut fmt:: Formatter ) -> fmt:: Result {
600+ fn fmt ( & self , f : & mut fmt:: Formatter < ' _ > ) -> fmt:: Result {
601601 f. debug_struct ( "BorrowMutError" ) . finish ( )
602602 }
603603}
604604
605605#[ stable( feature = "try_borrow" , since = "1.13.0" ) ]
606606impl Display for BorrowMutError {
607- fn fmt ( & self , f : & mut fmt:: Formatter ) -> fmt:: Result {
607+ fn fmt ( & self , f : & mut fmt:: Formatter < ' _ > ) -> fmt:: Result {
608608 Display :: fmt ( "already borrowed" , f)
609609 }
610610}
@@ -788,7 +788,7 @@ impl<T: ?Sized> RefCell<T> {
788788 /// ```
789789 #[ stable( feature = "rust1" , since = "1.0.0" ) ]
790790 #[ inline]
791- pub fn borrow ( & self ) -> Ref < T > {
791+ pub fn borrow ( & self ) -> Ref < ' _ , T > {
792792 self . try_borrow ( ) . expect ( "already mutably borrowed" )
793793 }
794794
@@ -819,7 +819,7 @@ impl<T: ?Sized> RefCell<T> {
819819 /// ```
820820 #[ stable( feature = "try_borrow" , since = "1.13.0" ) ]
821821 #[ inline]
822- pub fn try_borrow ( & self ) -> Result < Ref < T > , BorrowError > {
822+ pub fn try_borrow ( & self ) -> Result < Ref < ' _ , T > , BorrowError > {
823823 match BorrowRef :: new ( & self . borrow ) {
824824 Some ( b) => Ok ( Ref {
825825 value : unsafe { & * self . value . get ( ) } ,
@@ -869,7 +869,7 @@ impl<T: ?Sized> RefCell<T> {
869869 /// ```
870870 #[ stable( feature = "rust1" , since = "1.0.0" ) ]
871871 #[ inline]
872- pub fn borrow_mut ( & self ) -> RefMut < T > {
872+ pub fn borrow_mut ( & self ) -> RefMut < ' _ , T > {
873873 self . try_borrow_mut ( ) . expect ( "already borrowed" )
874874 }
875875
@@ -897,7 +897,7 @@ impl<T: ?Sized> RefCell<T> {
897897 /// ```
898898 #[ stable( feature = "try_borrow" , since = "1.13.0" ) ]
899899 #[ inline]
900- pub fn try_borrow_mut ( & self ) -> Result < RefMut < T > , BorrowMutError > {
900+ pub fn try_borrow_mut ( & self ) -> Result < RefMut < ' _ , T > , BorrowMutError > {
901901 match BorrowRefMut :: new ( & self . borrow ) {
902902 Some ( b) => Ok ( RefMut {
903903 value : unsafe { & mut * self . value . get ( ) } ,
@@ -1245,7 +1245,7 @@ impl<'b, T: ?Sized + Unsize<U>, U: ?Sized> CoerceUnsized<Ref<'b, U>> for Ref<'b,
12451245
12461246#[ stable( feature = "std_guard_impls" , since = "1.20.0" ) ]
12471247impl < T : ?Sized + fmt:: Display > fmt:: Display for Ref < ' _ , T > {
1248- fn fmt ( & self , f : & mut fmt:: Formatter ) -> fmt:: Result {
1248+ fn fmt ( & self , f : & mut fmt:: Formatter < ' _ > ) -> fmt:: Result {
12491249 self . value . fmt ( f)
12501250 }
12511251}
@@ -1402,7 +1402,7 @@ impl<'b, T: ?Sized + Unsize<U>, U: ?Sized> CoerceUnsized<RefMut<'b, U>> for RefM
14021402
14031403#[ stable( feature = "std_guard_impls" , since = "1.20.0" ) ]
14041404impl < T : ?Sized + fmt:: Display > fmt:: Display for RefMut < ' _ , T > {
1405- fn fmt ( & self , f : & mut fmt:: Formatter ) -> fmt:: Result {
1405+ fn fmt ( & self , f : & mut fmt:: Formatter < ' _ > ) -> fmt:: Result {
14061406 self . value . fmt ( f)
14071407 }
14081408}
0 commit comments