]> git.proxmox.com Git - rustc.git/blob - src/test/ui/generator/dropck.stderr
New upstream version 1.35.0+dfsg1
[rustc.git] / src / test / ui / generator / dropck.stderr
1 error[E0597]: `*cell` does not live long enough
2 --> $DIR/dropck.rs:10:40
3 |
4 LL | let ref_ = Box::leak(Box::new(Some(cell.borrow_mut())));
5 | ^^^^ borrowed value does not live long enough
6 ...
7 LL | }
8 | - `*cell` dropped here while still borrowed
9 |
10 = note: values in a scope are dropped in the opposite order they are created
11
12 error[E0597]: `ref_` does not live long enough
13 --> $DIR/dropck.rs:15:18
14 |
15 LL | gen = || {
16 | -- capture occurs here
17 LL | // but the generator can use it to drop a `Ref<'a, i32>`.
18 LL | let _d = ref_.take();
19 | ^^^^ borrowed value does not live long enough
20 ...
21 LL | }
22 | - borrowed value dropped before borrower
23 |
24 = note: values in a scope are dropped in the opposite order they are created
25
26 error: aborting due to 2 previous errors
27
28 For more information about this error, try `rustc --explain E0597`.