1 error[E0597]: `x` does not live long enough
2 --> $DIR/issue-29106.rs:26:26
4 LL | y = Arc::new(Foo(&x));
5 | ^^ borrowed value does not live long enough
9 | borrowed value only lives until here
10 | borrow later used here, when `y` is dropped
12 error[E0597]: `x` does not live long enough
13 --> $DIR/issue-29106.rs:33:25
15 LL | y = Rc::new(Foo(&x));
16 | ^^ borrowed value does not live long enough
20 | borrowed value only lives until here
21 | borrow later used here, when `y` is dropped
23 error: aborting due to 2 previous errors
25 For more information about this error, try `rustc --explain E0597`.