We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a3bfe9f commit 9fc8b25Copy full SHA for 9fc8b25
src/futures_map.rs
@@ -141,7 +141,8 @@ where
141
// SAFETY: this returns `None` and drops a `&T`, which is safe because dropping a reference is trivial.
142
let inner = any.downcast_ref::<T>()?;
143
144
- // Safety: The pointer is already pinned.
+ // Safety: The pointer is already pinned, and will remain pinned for its entire lifetime,
145
+ // because we return a `Pin<&T>`.
146
let pinned = unsafe { Pin::new_unchecked(inner) };
147
148
Some((&a.tag, pinned))
0 commit comments