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> {
281281 type Output = F :: Output ;
282282
283283 fn poll ( self : Pin < & mut Self > , cx : & mut Context < ' _ > ) -> Poll < Self :: Output > {
284+ // SAFETY: pin projection. AssertUnwindSafe follows structural pinning.
284285 let pinned_field = unsafe { Pin :: map_unchecked_mut ( self , |x| & mut x. 0 ) } ;
285286 F :: poll ( pinned_field, cx)
286287 }
@@ -291,6 +292,7 @@ impl<S: Stream> Stream for AssertUnwindSafe<S> {
291292 type Item = S :: Item ;
292293
293294 fn poll_next ( self : Pin < & mut Self > , cx : & mut Context < ' _ > ) -> Poll < Option < S :: Item > > {
295+ // SAFETY: pin projection. AssertUnwindSafe follows structural pinning.
294296 unsafe { self . map_unchecked_mut ( |x| & mut x. 0 ) } . poll_next ( cx)
295297 }
296298
You can’t perform that action at this time.
0 commit comments