26 lines
756 B
Plaintext
26 lines
756 B
Plaintext
error[E0597]: `x` does not live long enough
|
|
--> $DIR/issue-29106.rs:26:26
|
|
|
|
|
LL | y = Arc::new(Foo(&x));
|
|
| ^^ borrowed value does not live long enough
|
|
LL | }
|
|
| -
|
|
| |
|
|
| borrowed value only lives until here
|
|
| borrow later used here, when `y` is dropped
|
|
|
|
error[E0597]: `x` does not live long enough
|
|
--> $DIR/issue-29106.rs:33:25
|
|
|
|
|
LL | y = Rc::new(Foo(&x));
|
|
| ^^ borrowed value does not live long enough
|
|
LL | }
|
|
| -
|
|
| |
|
|
| borrowed value only lives until here
|
|
| borrow later used here, when `y` is dropped
|
|
|
|
error: aborting due to 2 previous errors
|
|
|
|
For more information about this error, try `rustc --explain E0597`.
|