1 error[E0716]: temporary value dropped while borrowed
2 --> $DIR/regions-ref-in-fn-arg.rs:14:13
4 LL | fn arg_item(box ref x: Box<isize>) -> &'static isize {
5 | ^^^^^^^^^ creates a temporary which is freed while still in use
6 LL | x //~^ ERROR borrowed value does not live long enough
8 | - temporary value is freed at the end of this statement
10 = note: borrowed value must be valid for the static lifetime...
12 error[E0716]: temporary value dropped while borrowed
13 --> $DIR/regions-ref-in-fn-arg.rs:21:11
15 LL | with(|box ref x| x) //~ ERROR borrowed value does not live long enough
16 | ^^^^^^^^^ - temporary value is freed at the end of this statement
18 | creates a temporary which is freed while still in use
20 error: aborting due to 2 previous errors
22 For more information about this error, try `rustc --explain E0716`.