@@ -577,14 +577,14 @@ pub struct BorrowError {
577
577
578
578
#[ stable( feature = "try_borrow" , since = "1.13.0" ) ]
579
579
impl Debug for BorrowError {
580
- fn fmt ( & self , f : & mut fmt:: Formatter ) -> fmt:: Result {
580
+ fn fmt ( & self , f : & mut fmt:: Formatter < ' _ > ) -> fmt:: Result {
581
581
f. debug_struct ( "BorrowError" ) . finish ( )
582
582
}
583
583
}
584
584
585
585
#[ stable( feature = "try_borrow" , since = "1.13.0" ) ]
586
586
impl Display for BorrowError {
587
- fn fmt ( & self , f : & mut fmt:: Formatter ) -> fmt:: Result {
587
+ fn fmt ( & self , f : & mut fmt:: Formatter < ' _ > ) -> fmt:: Result {
588
588
Display :: fmt ( "already mutably borrowed" , f)
589
589
}
590
590
}
@@ -597,14 +597,14 @@ pub struct BorrowMutError {
597
597
598
598
#[ stable( feature = "try_borrow" , since = "1.13.0" ) ]
599
599
impl Debug for BorrowMutError {
600
- fn fmt ( & self , f : & mut fmt:: Formatter ) -> fmt:: Result {
600
+ fn fmt ( & self , f : & mut fmt:: Formatter < ' _ > ) -> fmt:: Result {
601
601
f. debug_struct ( "BorrowMutError" ) . finish ( )
602
602
}
603
603
}
604
604
605
605
#[ stable( feature = "try_borrow" , since = "1.13.0" ) ]
606
606
impl Display for BorrowMutError {
607
- fn fmt ( & self , f : & mut fmt:: Formatter ) -> fmt:: Result {
607
+ fn fmt ( & self , f : & mut fmt:: Formatter < ' _ > ) -> fmt:: Result {
608
608
Display :: fmt ( "already borrowed" , f)
609
609
}
610
610
}
@@ -788,7 +788,7 @@ impl<T: ?Sized> RefCell<T> {
788
788
/// ```
789
789
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
790
790
#[ inline]
791
- pub fn borrow ( & self ) -> Ref < T > {
791
+ pub fn borrow ( & self ) -> Ref < ' _ , T > {
792
792
self . try_borrow ( ) . expect ( "already mutably borrowed" )
793
793
}
794
794
@@ -819,7 +819,7 @@ impl<T: ?Sized> RefCell<T> {
819
819
/// ```
820
820
#[ stable( feature = "try_borrow" , since = "1.13.0" ) ]
821
821
#[ inline]
822
- pub fn try_borrow ( & self ) -> Result < Ref < T > , BorrowError > {
822
+ pub fn try_borrow ( & self ) -> Result < Ref < ' _ , T > , BorrowError > {
823
823
match BorrowRef :: new ( & self . borrow ) {
824
824
Some ( b) => Ok ( Ref {
825
825
value : unsafe { & * self . value . get ( ) } ,
@@ -869,7 +869,7 @@ impl<T: ?Sized> RefCell<T> {
869
869
/// ```
870
870
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
871
871
#[ inline]
872
- pub fn borrow_mut ( & self ) -> RefMut < T > {
872
+ pub fn borrow_mut ( & self ) -> RefMut < ' _ , T > {
873
873
self . try_borrow_mut ( ) . expect ( "already borrowed" )
874
874
}
875
875
@@ -897,7 +897,7 @@ impl<T: ?Sized> RefCell<T> {
897
897
/// ```
898
898
#[ stable( feature = "try_borrow" , since = "1.13.0" ) ]
899
899
#[ inline]
900
- pub fn try_borrow_mut ( & self ) -> Result < RefMut < T > , BorrowMutError > {
900
+ pub fn try_borrow_mut ( & self ) -> Result < RefMut < ' _ , T > , BorrowMutError > {
901
901
match BorrowRefMut :: new ( & self . borrow ) {
902
902
Some ( b) => Ok ( RefMut {
903
903
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,
1245
1245
1246
1246
#[ stable( feature = "std_guard_impls" , since = "1.20.0" ) ]
1247
1247
impl < 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 {
1249
1249
self . value . fmt ( f)
1250
1250
}
1251
1251
}
@@ -1402,7 +1402,7 @@ impl<'b, T: ?Sized + Unsize<U>, U: ?Sized> CoerceUnsized<RefMut<'b, U>> for RefM
1402
1402
1403
1403
#[ stable( feature = "std_guard_impls" , since = "1.20.0" ) ]
1404
1404
impl < 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 {
1406
1406
self . value . fmt ( f)
1407
1407
}
1408
1408
}
0 commit comments