Closed
Description
STR
#![feature(unboxed_closures)]
#[cfg(error)]
fn adder(y: int) -> Box<Fn(int) -> int + 'static> {
//~^ error: explicit lifetime bound required
box move |&: x| y + x
}
#[cfg(not(error))]
fn adder(y: int) -> Box<Fn<(int,), int> + 'static> {
box move |&: x| y + x
}
fn main() {}
Version: ebc625a
(2014-11-08)
Metadata
Metadata
Assignees
Labels
No labels