blob: 0250f6e26fea9b4f4feb0e54ba9719e230a6c5b6 [file] [log] [blame]
error[E0597]: borrowed value does not live long enough
--> $DIR/regions-ref-in-fn-arg.rs:14:17
|
LL | fn arg_item(box ref x: Box<isize>) -> &'static isize {
| ^^^^^ borrowed value does not live long enough
LL | x //~^ ERROR borrowed value does not live long enough
LL | }
| - borrowed value only lives until here
|
= note: borrowed value must be valid for the static lifetime...
error[E0597]: borrowed value does not live long enough
--> $DIR/regions-ref-in-fn-arg.rs:21:15
|
LL | with(|box ref x| x) //~ ERROR borrowed value does not live long enough
| ^^^^^ - borrowed value only lives until here
| |
| borrowed value does not live long enough
|
= note: borrowed value must be valid for the static lifetime...
error: aborting due to 2 previous errors
For more information about this error, try `rustc --explain E0597`.