2015-01-03 10:45:00 -05:00
|
|
|
fn bar<F>(blk: F) where F: FnOnce() + 'static {
|
2013-06-13 19:38:36 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
fn foo(x: &()) {
|
2015-08-07 13:23:11 -04:00
|
|
|
bar(|| {
|
2022-04-01 13:13:25 -04:00
|
|
|
//~^ ERROR borrowed data escapes
|
|
|
|
//~| ERROR closure may outlive
|
2014-09-22 14:47:06 -04:00
|
|
|
let _ = x;
|
2013-11-21 17:23:21 -08:00
|
|
|
})
|
2013-06-13 19:38:36 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
fn main() {
|
|
|
|
}
|