summary refs log tree commit diff
path: root/src/test/ui/generator/borrowing.stderr
blob: 169e4a8561c1d38ae20e4e3cabf536f77e3dcc1f (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:9:33
   |
LL |         Pin::new(&mut || 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:16: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`.