1 error[E0621]: explicit lifetime required in the type of `ap`
2 --> $DIR/variadic-ffi-4.rs:8:5
4 LL | pub unsafe extern "C" fn no_escape0<'f>(_: usize, ap: ...) -> VaListImpl<'f> {
5 | --- help: add explicit lifetime `'f` to the type of `ap`: `core::ffi::VaListImpl<'f>`
7 | ^^ lifetime `'f` required
9 error[E0621]: explicit lifetime required in the type of `ap`
10 --> $DIR/variadic-ffi-4.rs:12:5
12 LL | pub unsafe extern "C" fn no_escape1(_: usize, ap: ...) -> VaListImpl<'static> {
13 | --- help: add explicit lifetime `'static` to the type of `ap`: `core::ffi::VaListImpl<'static>`
15 | ^^ lifetime `'static` required
17 error: lifetime may not live long enough
18 --> $DIR/variadic-ffi-4.rs:16:33
20 LL | let _ = ap.with_copy(|ap| { ap });
21 | --- ^^ returning this value requires that `'1` must outlive `'2`
23 | | return type of closure is core::ffi::VaList<'2, '_>
24 | has type `core::ffi::VaList<'1, '_>`
26 error: lifetime may not live long enough
27 --> $DIR/variadic-ffi-4.rs:20:5
29 LL | pub unsafe extern "C" fn no_escape3(_: usize, mut ap0: &mut VaListImpl, mut ap1: ...) {
30 | ------- ------- has type `core::ffi::VaListImpl<'2>`
32 | has type `&mut core::ffi::VaListImpl<'1>`
34 | ^^^^ assignment requires that `'1` must outlive `'2`
36 error: lifetime may not live long enough
37 --> $DIR/variadic-ffi-4.rs:20:5
39 LL | pub unsafe extern "C" fn no_escape3(_: usize, mut ap0: &mut VaListImpl, mut ap1: ...) {
40 | ------- ------- has type `core::ffi::VaListImpl<'2>`
42 | has type `&mut core::ffi::VaListImpl<'1>`
44 | ^^^^ assignment requires that `'2` must outlive `'1`
46 error: lifetime may not live long enough
47 --> $DIR/variadic-ffi-4.rs:25:5
49 LL | pub unsafe extern "C" fn no_escape4(_: usize, ap0: &mut VaListImpl, mut ap1: ...) {
50 | --- ------- has type `core::ffi::VaListImpl<'2>`
52 | has type `&mut core::ffi::VaListImpl<'1>`
54 | ^^^^^^^^^^^^^^ assignment requires that `'1` must outlive `'2`
56 error: lifetime may not live long enough
57 --> $DIR/variadic-ffi-4.rs:25:5
59 LL | pub unsafe extern "C" fn no_escape4(_: usize, ap0: &mut VaListImpl, mut ap1: ...) {
60 | --- ------- has type `core::ffi::VaListImpl<'2>`
62 | has type `&mut core::ffi::VaListImpl<'1>`
64 | ^^^^^^^^^^^^^^ assignment requires that `'2` must outlive `'1`
66 error[E0384]: cannot assign to immutable argument `ap0`
67 --> $DIR/variadic-ffi-4.rs:25:5
69 LL | pub unsafe extern "C" fn no_escape4(_: usize, ap0: &mut VaListImpl, mut ap1: ...) {
70 | --- help: make this binding mutable: `mut ap0`
72 | ^^^^^^^^^^^^^^ cannot assign to immutable argument
74 error[E0597]: `ap1` does not live long enough
75 --> $DIR/variadic-ffi-4.rs:25:11
77 LL | pub unsafe extern "C" fn no_escape4(_: usize, ap0: &mut VaListImpl, mut ap1: ...) {
78 | - let's call the lifetime of this reference `'1`
82 | | borrowed value does not live long enough
83 | assignment requires that `ap1` is borrowed for `'1`
86 | - `ap1` dropped here while still borrowed
88 error: lifetime may not live long enough
89 --> $DIR/variadic-ffi-4.rs:33:12
91 LL | pub unsafe extern "C" fn no_escape5(_: usize, mut ap0: &mut VaListImpl, mut ap1: ...) {
92 | ------- ------- has type `core::ffi::VaListImpl<'2>`
94 | has type `&mut core::ffi::VaListImpl<'1>`
95 LL | *ap0 = ap1.clone();
96 | ^^^^^^^^^^^ argument requires that `'1` must outlive `'2`
98 error: lifetime may not live long enough
99 --> $DIR/variadic-ffi-4.rs:33:12
101 LL | pub unsafe extern "C" fn no_escape5(_: usize, mut ap0: &mut VaListImpl, mut ap1: ...) {
102 | ------- ------- has type `core::ffi::VaListImpl<'2>`
104 | has type `&mut core::ffi::VaListImpl<'1>`
105 LL | *ap0 = ap1.clone();
106 | ^^^^^^^^^^^ argument requires that `'2` must outlive `'1`
108 error: aborting due to 11 previous errors
110 Some errors have detailed explanations: E0384, E0597, E0621.
111 For more information about an error, try `rustc --explain E0384`.