Rollup merge of #67935 - Thomasdezeeuw:issue_67669, r=withoutboats
Relax the Sized bounds on Pin::map_unchecked(_mut) Fixes #67669.
This commit is contained in:
commit
ee90f09ea0
@ -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 @@ pub unsafe fn get_unchecked_mut(self) -> &'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);
|
||||
|
Loading…
Reference in New Issue
Block a user