summary refs log tree commit diff
path: root/src/test/ui/nll/capture-ref-in-struct.stderr
blob: 7e7487daa67a377d3647c22b32aab4d50f378e2b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
error[E0597]: `y` does not live long enough
  --> $DIR/capture-ref-in-struct.rs:33:16
   |
33 |             y: &y,
   |                ^^ borrowed value does not live long enough
...
38 |     }
   |      - borrowed value only lives until here
39 | 
40 |     deref(p);
   |           - borrow later used here
   |
   = note: borrowed value must be valid for lifetime '_#5r...

error: aborting due to previous error