Skip to content

Commit

Permalink
Rollup merge of rust-lang#62491 - GuillaumeGomez:fix-pin-urls-for-opt…
Browse files Browse the repository at this point in the history
…ion, r=QuietMisdreavus

Fix Pin urls in Option documentation

Fixes the following situation:

![Screenshot from 2019-07-08 13-24-59](https://user-images.githubusercontent.com/3050060/60806822-55dfdc00-a184-11e9-9ee3-279e82fc92bd.png)

r? @QuietMisdreavus
  • Loading branch information
Mark-Simulacrum authored Jul 13, 2019
2 parents 67c38d9 + 224757f commit 6b6858d
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/libcore/option.rs
Original file line number Diff line number Diff line change
Expand Up @@ -291,6 +291,8 @@ impl<T> Option<T> {


/// Converts from [`Pin`]`<&Option<T>>` to `Option<`[`Pin`]`<&T>>`.
///
/// [`Pin`]: ../pin/struct.Pin.html
#[inline]
#[stable(feature = "pin", since = "1.33.0")]
pub fn as_pin_ref<'a>(self: Pin<&'a Option<T>>) -> Option<Pin<&'a T>> {
Expand All @@ -300,6 +302,8 @@ impl<T> Option<T> {
}

/// Converts from [`Pin`]`<&mut Option<T>>` to `Option<`[`Pin`]`<&mut T>>`.
///
/// [`Pin`]: ../pin/struct.Pin.html
#[inline]
#[stable(feature = "pin", since = "1.33.0")]
pub fn as_pin_mut<'a>(self: Pin<&'a mut Option<T>>) -> Option<Pin<&'a mut T>> {
Expand Down

0 comments on commit 6b6858d

Please sign in to comment.