Sign in
rust
/
rust-lang
/
rust
/
refs/heads/perf-tmp
/
.
/
tests
/
ui
/
lifetimes
/
closure-lifetime-bounds-10291.rs
blob: 42dc6c2cafad8ecd7885210aa0c8bb2ac93d5921 [
file
] [
log
] [
blame
]
//! Regression test for https://github.com/rust-lang/rust/issues/10291
fn
test
<
'x>(x: &'
x isize
)
{
drop
::<
Box
<
dyn
for
<
'z> FnMut(&'
z isize
)
->
&
'
z isize
>>(
Box
::
new
(|
z
|
{
x
//~^ ERROR lifetime may not live long enough
}));
}
fn
main
()
{}