1 #![feature(box_patterns)]
4 fn arg_item(box ref x: Box<isize>) -> &'static isize {
5 x //~ ERROR cannot return value referencing function parameter
8 fn with<R, F>(f: F) -> R where F: FnOnce(Box<isize>) -> R { f(Box::new(3)) }
10 fn arg_closure() -> &'static isize {
11 with(|box ref x| x) //~ ERROR cannot return value referencing function parameter