File tree Expand file tree Collapse file tree 2 files changed +26
-0
lines changed Expand file tree Collapse file tree 2 files changed +26
-0
lines changed Original file line number Diff line number Diff line change @@ -127,6 +127,18 @@ async unsafe fn unsafe_async_fn(x: u8) -> u8 {
127127 x
128128}
129129
130+ unsafe fn unsafe_fn ( x : u8 ) -> u8 {
131+ x
132+ }
133+
134+ fn async_block_in_unsafe_block ( x : u8 ) -> impl Future < Output = u8 > {
135+ unsafe {
136+ async move {
137+ unsafe_fn ( unsafe_async_fn ( x) . await )
138+ }
139+ }
140+ }
141+
130142struct Foo ;
131143
132144trait Bar {
@@ -184,6 +196,7 @@ fn main() {
184196 async_fn,
185197 generic_async_fn,
186198 async_fn_with_internal_borrow,
199+ async_block_in_unsafe_block,
187200 Foo :: async_assoc_item,
188201 |x| {
189202 async move {
Original file line number Diff line number Diff line change @@ -127,6 +127,18 @@ async unsafe fn unsafe_async_fn(x: u8) -> u8 {
127127 x
128128}
129129
130+ unsafe fn unsafe_fn ( x : u8 ) -> u8 {
131+ x
132+ }
133+
134+ fn async_block_in_unsafe_block ( x : u8 ) -> impl Future < Output = u8 > {
135+ unsafe {
136+ async move {
137+ unsafe_fn ( await ! ( unsafe_async_fn( x) ) )
138+ }
139+ }
140+ }
141+
130142struct Foo ;
131143
132144trait Bar {
@@ -184,6 +196,7 @@ fn main() {
184196 async_fn,
185197 generic_async_fn,
186198 async_fn_with_internal_borrow,
199+ async_block_in_unsafe_block,
187200 Foo :: async_assoc_item,
188201 |x| {
189202 async move {
You can’t perform that action at this time.
0 commit comments