Skip to content

Commit

Permalink
Rollup merge of rust-lang#67935 - Thomasdezeeuw:issue_67669, r=withou…
Browse files Browse the repository at this point in the history
…tboats

Relax the Sized bounds on Pin::map_unchecked(_mut)

Fixes rust-lang#67669.
  • Loading branch information
Centril committed Jan 9, 2020
2 parents 7954437 + d288c28 commit dde8f03
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/libcore/pin.rs
Original file line number Diff line number Diff line change
Expand Up @@ -672,6 +672,7 @@ impl<'a, T: ?Sized> Pin<&'a T> {
#[stable(feature = "pin", since = "1.33.0")]
pub unsafe fn map_unchecked<U, F>(self, func: F) -> Pin<&'a U>
where
U: ?Sized,
F: FnOnce(&T) -> &U,
{
let pointer = &*self.pointer;
Expand Down Expand Up @@ -763,6 +764,7 @@ impl<'a, T: ?Sized> Pin<&'a mut T> {
#[stable(feature = "pin", since = "1.33.0")]
pub unsafe fn map_unchecked_mut<U, F>(self, func: F) -> Pin<&'a mut U>
where
U: ?Sized,
F: FnOnce(&mut T) -> &mut U,
{
let pointer = Pin::get_unchecked_mut(self);
Expand Down

0 comments on commit dde8f03

Please sign in to comment.