about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorYuki Okushi <huyuumi.dev@gmail.com>2020-01-10 04:18:36 +0900
committerGitHub <noreply@github.com>2020-01-10 04:18:36 +0900
commitee90f09ea0db4bb852fdf975f6cc85692fbbf212 (patch)
treeb3fb6ea9ca806fb002f9336ba77b0d75b1db4fa3 /src
parent78db333f9dd6786b156e2b3e4bec85f959d22606 (diff)
parentd288c28ff323445e6157b95893072a571009a434 (diff)
downloadrust-ee90f09ea0db4bb852fdf975f6cc85692fbbf212.tar.gz
rust-ee90f09ea0db4bb852fdf975f6cc85692fbbf212.zip
Rollup merge of #67935 - Thomasdezeeuw:issue_67669, r=withoutboats
Relax the Sized bounds on Pin::map_unchecked(_mut)

Fixes #67669.
Diffstat (limited to 'src')
-rw-r--r--src/libcore/pin.rs2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/libcore/pin.rs b/src/libcore/pin.rs
index aca6fb20138..676d2c784ac 100644
--- a/src/libcore/pin.rs
+++ b/src/libcore/pin.rs
@@ -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;
@@ -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);