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