1 #![feature(box_patterns)]
2 #![feature(box_syntax)]
4 fn arg_item(box ref x: Box<isize>) -> &'static isize {
5 x //~^ ERROR borrowed value does not live long enough
8 fn with<R, F>(f: F) -> R where F: FnOnce(Box<isize>) -> R { f(box 3) }
10 fn arg_closure() -> &'static isize {
11 with(|box ref x| x) //~ ERROR borrowed value does not live long enough