2012-08-20 18:53:33 -05:00
|
|
|
fn wants_static_fn(_x: &static/fn()) {}
|
|
|
|
|
|
|
|
fn main() {
|
|
|
|
let i = 3;
|
|
|
|
do wants_static_fn {
|
2012-10-12 14:32:36 -05:00
|
|
|
debug!("i=%d", i);
|
2012-08-20 18:53:33 -05:00
|
|
|
//~^ ERROR captured variable does not outlive the enclosing closure
|
|
|
|
}
|
|
|
|
}
|