Sign in
android
/
toolchain
/
rustc
/
refs/heads/main
/
.
/
tests
/
ui
/
closures
/
closure-bounds-static-cant-capture-borrowed.rs
blob: 7327d8256685d5ee966b9daeec41195b9bb8cb1b [
file
] [
log
] [
blame
] [
edit
]
fn
bar
<
F
>(
blk
:
F
)
where F
:
FnOnce
()
+
'
static
{
}
fn
foo
(
x
:
&())
{
bar
(||
{
//~^ ERROR borrowed data escapes
//~| ERROR closure may outlive
let
_
=
x
;
})
}
fn
main
()
{
}