Sign in
◑
Theme
rust
/
rust
/
121f01b133571d2aa8ce0618bfee182ecdddfdba
/
.
/
tests
/
ui
/
async-await
/
async-borrowck-escaping-closure-error.rs
blob: 4489f344e6f2ee49cad6b4e8a81007f763183768 [
file
]
//@ edition:2018
fn
foo
()
->
Box
<
dyn std
::
future
::
Future
<
Output
=
u32
>>
{
let
x
=
0u32
;
Box
::
new
((
async
||
x
)())
//~^ ERROR cannot return value referencing local variable `x`
}
fn
main
()
{
}