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