summary refs log tree commit diff
path: root/src/test/ui/generator/borrowing.stderr
blob: cb84eaedb3354836a8b73532a077702c12e12e8b (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
error[E0597]: `a` does not live long enough
  --> $DIR/borrowing.rs:18:20
   |
18 |         (|| yield &a).resume()
   |          --        ^ borrowed value does not live long enough
   |          |
   |          capture occurs here
19 |         //~^ ERROR: `a` does not live long enough
20 |     };
   |     - borrowed value only lives until here
...
29 | }
   | - borrowed value needs to live until here

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

error: aborting due to 2 previous errors