]>
Commit | Line | Data |
---|---|---|
dc9dc135 XL |
1 | error[E0597]: `c` does not live long enough |
2 | --> $DIR/adt-tuple-struct-calls.rs:27:7 | |
3 | | | |
4 | LL | f(&c); | |
5 | | --^^- | |
6 | | | | | |
7 | | | borrowed value does not live long enough | |
8 | | argument requires that `c` is borrowed for `'static` | |
9 | LL | } | |
10 | | - `c` dropped here while still borrowed | |
11 | ||
12 | error[E0597]: `c` does not live long enough | |
13 | --> $DIR/adt-tuple-struct-calls.rs:33:7 | |
14 | | | |
15 | LL | fn annot_reference_named_lifetime<'a>(_d: &'a u32) { | |
16 | | -- lifetime `'a` defined here | |
17 | ... | |
18 | LL | f(&c); | |
19 | | --^^- | |
20 | | | | | |
21 | | | borrowed value does not live long enough | |
22 | | argument requires that `c` is borrowed for `'a` | |
23 | LL | } | |
24 | | - `c` dropped here while still borrowed | |
25 | ||
26 | error[E0597]: `c` does not live long enough | |
27 | --> $DIR/adt-tuple-struct-calls.rs:45:11 | |
28 | | | |
29 | LL | fn annot_reference_named_lifetime_in_closure<'a>(_: &'a u32) { | |
30 | | -- lifetime `'a` defined here | |
31 | ... | |
32 | LL | f(&c); | |
33 | | --^^- | |
34 | | | | | |
35 | | | borrowed value does not live long enough | |
36 | | argument requires that `c` is borrowed for `'a` | |
f2b60f7d FG |
37 | LL | }; |
38 | | - `c` dropped here while still borrowed | |
dc9dc135 XL |
39 | |
40 | error[E0597]: `c` does not live long enough | |
41 | --> $DIR/adt-tuple-struct-calls.rs:53:11 | |
42 | | | |
43 | LL | let f = SomeStruct::<&'a u32>; | |
44 | | - lifetime `'1` appears in the type of `f` | |
f2b60f7d | 45 | ... |
dc9dc135 XL |
46 | LL | f(&c); |
47 | | --^^- | |
48 | | | | | |
49 | | | borrowed value does not live long enough | |
50 | | argument requires that `c` is borrowed for `'1` | |
f2b60f7d FG |
51 | LL | }; |
52 | | - `c` dropped here while still borrowed | |
dc9dc135 XL |
53 | |
54 | error: aborting due to 4 previous errors | |
55 | ||
56 | For more information about this error, try `rustc --explain E0597`. |