1 error[E0597]: `x` does not live long enough
2 --> $DIR/issue-29106.rs:16:26
4 LL | y = Arc::new(Foo(&x));
5 | ^^ borrowed value does not live long enough
9 | `x` dropped here while still borrowed
10 | borrow might be used here, when `y` is dropped and runs the `Drop` code for type `Arc`
12 = note: values in a scope are dropped in the opposite order they are defined
14 error[E0597]: `x` does not live long enough
15 --> $DIR/issue-29106.rs:23:25
17 LL | y = Rc::new(Foo(&x));
18 | ^^ borrowed value does not live long enough
22 | `x` dropped here while still borrowed
23 | borrow might be used here, when `y` is dropped and runs the `Drop` code for type `Rc`
25 = note: values in a scope are dropped in the opposite order they are defined
27 error: aborting due to 2 previous errors
29 For more information about this error, try `rustc --explain E0597`.