@@ -784,12 +784,12 @@ impl<'a, T: ?Sized> Pin<&'a mut T> {
784
784
impl < T : ?Sized > Pin < & ' static T > {
785
785
/// Get a pinned reference from a static reference.
786
786
///
787
- /// This is safe, because the `'static` lifetime guarantees the data will
788
- /// never be moved .
787
+ /// This is safe, because `T` is borrowed for the `'static` lifetime, which
788
+ /// never ends .
789
789
#[ unstable( feature = "pin_static_ref" , issue = "none" ) ]
790
790
#[ rustc_const_unstable( feature = "const_pin" , issue = "76654" ) ]
791
791
pub const fn static_ref ( r : & ' static T ) -> Pin < & ' static T > {
792
- // SAFETY: The 'static lifetime guarantees the data will not be
792
+ // SAFETY: The 'static borrow guarantees the data will not be
793
793
// moved/invalidated until it gets dropped (which is never).
794
794
unsafe { Pin :: new_unchecked ( r) }
795
795
}
@@ -798,12 +798,12 @@ impl<T: ?Sized> Pin<&'static T> {
798
798
impl < T : ?Sized > Pin < & ' static T > {
799
799
/// Get a pinned mutable reference from a static mutable reference.
800
800
///
801
- /// This is safe, because the `'static` lifetime guarantees the data will
802
- /// never be moved .
801
+ /// This is safe, because `T` is borrowed for the `'static` lifetime, which
802
+ /// never ends .
803
803
#[ unstable( feature = "pin_static_ref" , issue = "none" ) ]
804
804
#[ rustc_const_unstable( feature = "const_pin" , issue = "76654" ) ]
805
805
pub const fn static_mut ( r : & ' static mut T ) -> Pin < & ' static mut T > {
806
- // SAFETY: The 'static lifetime guarantees the data will not be
806
+ // SAFETY: The 'static borrow guarantees the data will not be
807
807
// moved/invalidated until it gets dropped (which is never).
808
808
unsafe { Pin :: new_unchecked ( r) }
809
809
}
0 commit comments