1 error[E0515]: cannot return value referencing function parameter
2 --> $DIR/regions-ref-in-fn-arg.rs:5:5
4 LL | fn arg_item(box ref x: Box<isize>) -> &'static isize {
5 | --------- function parameter borrowed here
7 | ^ returns a value referencing data owned by the current function
9 error[E0515]: cannot return value referencing function parameter
10 --> $DIR/regions-ref-in-fn-arg.rs:11:22
12 LL | with(|box ref x| x)
13 | --------- ^ returns a value referencing data owned by the current function
15 | function parameter borrowed here
17 error: aborting due to 2 previous errors
19 For more information about this error, try `rustc --explain E0515`.