mirror of
https://github.com/rust-lang/rust.git
synced 2025-09-29 07:08:14 +00:00
11 lines
262 B
Rust
11 lines
262 B
Rust
//! 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() {}
|