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