File tree Expand file tree Collapse file tree 1 file changed +2
-0
lines changed Expand file tree Collapse file tree 1 file changed +2
-0
lines changed Original file line number Diff line number Diff line change @@ -281,6 +281,7 @@ impl<F: Future> Future for AssertUnwindSafe<F> {
281
281
type Output = F :: Output ;
282
282
283
283
fn poll ( self : Pin < & mut Self > , cx : & mut Context < ' _ > ) -> Poll < Self :: Output > {
284
+ // SAFETY: pin projection. AssertUnwindSafe follows structural pinning.
284
285
let pinned_field = unsafe { Pin :: map_unchecked_mut ( self , |x| & mut x. 0 ) } ;
285
286
F :: poll ( pinned_field, cx)
286
287
}
@@ -291,6 +292,7 @@ impl<S: Stream> Stream for AssertUnwindSafe<S> {
291
292
type Item = S :: Item ;
292
293
293
294
fn poll_next ( self : Pin < & mut Self > , cx : & mut Context < ' _ > ) -> Poll < Option < S :: Item > > {
295
+ // SAFETY: pin projection. AssertUnwindSafe follows structural pinning.
294
296
unsafe { self . map_unchecked_mut ( |x| & mut x. 0 ) } . poll_next ( cx)
295
297
}
296
298
You can’t perform that action at this time.
0 commit comments