summary refs log tree commit diff
path: root/src/test/ui/generator/borrowing.stderr
blob: 45d950b5aef646f9c24710e3159aa1fc1061a8ad (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
error[E0597]: `a` does not live long enough
  --> $DIR/borrowing.rs:18:29
   |
LL |         unsafe { (|| yield &a).resume() }
   |                   --        ^ borrowed value does not live long enough
   |                   |
   |                   capture occurs here
LL |         //~^ ERROR: `a` does not live long enough
LL |     };
   |     - borrowed value only lives until here
...
LL | }
   | - borrowed value needs to live until here

error[E0597]: `a` does not live long enough
  --> $DIR/borrowing.rs:25:20
   |
LL |         || {
   |         -- capture occurs here
LL |             yield &a
   |                    ^ borrowed value does not live long enough
...
LL |     };
   |     - borrowed value only lives until here
LL | }
   | - borrowed value needs to live until here

error: aborting due to 2 previous errors

For more information about this error, try `rustc --explain E0597`.