]> git.lizzy.rs Git - rust.git/blob - src/test/ui/span/issue-29106.stderr
Rollup merge of #87922 - Manishearth:c-enum-target-spec, r=nagisa,eddyb
[rust.git] / src / test / ui / span / issue-29106.stderr
1 error[E0597]: `x` does not live long enough
2   --> $DIR/issue-29106.rs:16:26
3    |
4 LL |         y = Arc::new(Foo(&x));
5    |                          ^^ borrowed value does not live long enough
6 LL |     }
7    |     -
8    |     |
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`
11    |
12    = note: values in a scope are dropped in the opposite order they are defined
13
14 error[E0597]: `x` does not live long enough
15   --> $DIR/issue-29106.rs:23:25
16    |
17 LL |         y = Rc::new(Foo(&x));
18    |                         ^^ borrowed value does not live long enough
19 LL |     }
20    |     -
21    |     |
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`
24    |
25    = note: values in a scope are dropped in the opposite order they are defined
26
27 error: aborting due to 2 previous errors
28
29 For more information about this error, try `rustc --explain E0597`.