Skip to content

Commit ee90f09

Browse files
authored
Rollup merge of #67935 - Thomasdezeeuw:issue_67669, r=withoutboats
Relax the Sized bounds on Pin::map_unchecked(_mut) Fixes #67669.
2 parents 78db333 + d288c28 commit ee90f09

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/libcore/pin.rs

+2
Original file line numberDiff line numberDiff line change
@@ -672,6 +672,7 @@ impl<'a, T: ?Sized> Pin<&'a T> {
672672
#[stable(feature = "pin", since = "1.33.0")]
673673
pub unsafe fn map_unchecked<U, F>(self, func: F) -> Pin<&'a U>
674674
where
675+
U: ?Sized,
675676
F: FnOnce(&T) -> &U,
676677
{
677678
let pointer = &*self.pointer;
@@ -763,6 +764,7 @@ impl<'a, T: ?Sized> Pin<&'a mut T> {
763764
#[stable(feature = "pin", since = "1.33.0")]
764765
pub unsafe fn map_unchecked_mut<U, F>(self, func: F) -> Pin<&'a mut U>
765766
where
767+
U: ?Sized,
766768
F: FnOnce(&mut T) -> &mut U,
767769
{
768770
let pointer = Pin::get_unchecked_mut(self);

0 commit comments

Comments
 (0)