error[E0621]: explicit lifetime required in the type of `ap` --> $DIR/variadic-ffi-5.rs:11:5 | LL | pub unsafe extern "C" fn no_escape0<'a>(_: usize, ap: ...) -> VaList<'a> { | --- help: add explicit lifetime `'a` to the type of `ap`: `core::ffi::VaList<'a>` LL | ap | ^^ lifetime `'a` required error[E0621]: explicit lifetime required in the type of `ap` --> $DIR/variadic-ffi-5.rs:15:5 | LL | pub unsafe extern "C" fn no_escape1(_: usize, ap: ...) -> VaList<'static> { | --- help: add explicit lifetime `'static` to the type of `ap`: `core::ffi::VaList<'static>` LL | ap | ^^ lifetime `'static` required error: lifetime may not live long enough --> $DIR/variadic-ffi-5.rs:19:33 | LL | let _ = ap.with_copy(|ap| { ap }); | --- ^^ returning this value requires that `'1` must outlive `'2` | | | | | return type of closure is core::ffi::VaList<'2> | has type `core::ffi::VaList<'1>` error: lifetime may not live long enough --> $DIR/variadic-ffi-5.rs:23:5 | LL | pub unsafe extern "C" fn no_escape3(_: usize, ap0: &mut VaList, mut ap1: ...) { | --- ------- has type `core::ffi::VaList<'1>` | | | has type `&mut core::ffi::VaList<'2>` LL | *ap0 = ap1; | ^^^^^^^^^^ assignment requires that `'1` must outlive `'2` error: lifetime may not live long enough --> $DIR/variadic-ffi-5.rs:27:5 | LL | pub unsafe extern "C" fn no_escape4(_: usize, mut ap0: &mut VaList, mut ap1: ...) { | ------- ------- has type `core::ffi::VaList<'2>` | | | has type `&mut core::ffi::VaList<'1>` LL | ap0 = &mut ap1; | ^^^^^^^^^^^^^^ assignment requires that `'1` must outlive `'2` error: lifetime may not live long enough --> $DIR/variadic-ffi-5.rs:27:5 | LL | pub unsafe extern "C" fn no_escape4(_: usize, mut ap0: &mut VaList, mut ap1: ...) { | ------- ------- has type `core::ffi::VaList<'1>` | | | has type `&mut core::ffi::VaList<'2>` LL | ap0 = &mut ap1; | ^^^^^^^^^^^^^^ assignment requires that `'1` must outlive `'2` error[E0597]: `ap1` does not live long enough --> $DIR/variadic-ffi-5.rs:27:11 | LL | pub unsafe extern "C" fn no_escape4(_: usize, mut ap0: &mut VaList, mut ap1: ...) { | - let's call the lifetime of this reference `'1` LL | ap0 = &mut ap1; | ------^^^^^^^^ | | | | | borrowed value does not live long enough | assignment requires that `ap1` is borrowed for `'1` ... LL | } | - `ap1` dropped here while still borrowed error: aborting due to 7 previous errors Some errors have detailed explanations: E0597, E0621. For more information about an error, try `rustc --explain E0597`.