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 {
127
127
x
128
128
}
129
129
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
+
130
142
struct Foo ;
131
143
132
144
trait Bar {
@@ -184,6 +196,7 @@ fn main() {
184
196
async_fn,
185
197
generic_async_fn,
186
198
async_fn_with_internal_borrow,
199
+ async_block_in_unsafe_block,
187
200
Foo :: async_assoc_item,
188
201
|x| {
189
202
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 {
127
127
x
128
128
}
129
129
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
+
130
142
struct Foo ;
131
143
132
144
trait Bar {
@@ -184,6 +196,7 @@ fn main() {
184
196
async_fn,
185
197
generic_async_fn,
186
198
async_fn_with_internal_borrow,
199
+ async_block_in_unsafe_block,
187
200
Foo :: async_assoc_item,
188
201
|x| {
189
202
async move {
You can’t perform that action at this time.
0 commit comments