File tree 2 files changed +4
-4
lines changed
2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -295,7 +295,7 @@ impl<T> Option<T> {
295
295
/// [`Pin`]: ../pin/struct.Pin.html
296
296
#[ inline]
297
297
#[ stable( feature = "pin" , since = "1.33.0" ) ]
298
- pub fn as_pin_ref < ' a > ( self : Pin < & ' a Option < T > > ) -> Option < Pin < & ' a T > > {
298
+ pub fn as_pin_ref ( self : Pin < & Self > ) -> Option < Pin < & T > > {
299
299
unsafe {
300
300
Pin :: get_ref ( self ) . as_ref ( ) . map ( |x| Pin :: new_unchecked ( x) )
301
301
}
@@ -306,7 +306,7 @@ impl<T> Option<T> {
306
306
/// [`Pin`]: ../pin/struct.Pin.html
307
307
#[ inline]
308
308
#[ stable( feature = "pin" , since = "1.33.0" ) ]
309
- pub fn as_pin_mut < ' a > ( self : Pin < & ' a mut Option < T > > ) -> Option < Pin < & ' a mut T > > {
309
+ pub fn as_pin_mut ( self : Pin < & mut Self > ) -> Option < Pin < & mut T > > {
310
310
unsafe {
311
311
Pin :: get_unchecked_mut ( self ) . as_mut ( ) . map ( |x| Pin :: new_unchecked ( x) )
312
312
}
Original file line number Diff line number Diff line change 233
233
//! # type Field = i32;
234
234
//! # struct Struct { field: Field }
235
235
//! impl Struct {
236
- //! fn pin_get_field<'a> (self: Pin<&'a mut Self>) -> &'a mut Field {
236
+ //! fn pin_get_field(self: Pin<&mut Self>) -> &mut Field {
237
237
//! // This is okay because `field` is never considered pinned.
238
238
//! unsafe { &mut self.get_unchecked_mut().field }
239
239
//! }
257
257
//! # type Field = i32;
258
258
//! # struct Struct { field: Field }
259
259
//! impl Struct {
260
- //! fn pin_get_field<'a> (self: Pin<&'a mut Self>) -> Pin<&'a mut Field> {
260
+ //! fn pin_get_field(self: Pin<&mut Self>) -> Pin<&mut Field> {
261
261
//! // This is okay because `field` is pinned when `self` is.
262
262
//! unsafe { self.map_unchecked_mut(|s| &mut s.field) }
263
263
//! }
You can’t perform that action at this time.
0 commit comments