fork/rust
git clone https://git.julia.blue/fork/rust
49cae55760d
1.44.0
1error[E0308]: mismatched types 2 --> $DIR/variadic-ffi-4.rs:8:5 3 | 4LL | ap 5 | ^^ lifetime mismatch 6 | 7 = note: expected struct `core::ffi::VaListImpl<'f>` 8 found struct `core::ffi::VaListImpl<'_>` 9note: the scope of call-site for function at 7:78... 10 --> $DIR/variadic-ffi-4.rs:7:78 11 | 12LL | pub unsafe extern "C" fn no_escape0<'f>(_: usize, ap: ...) -> VaListImpl<'f> { 13 | ______________________________________________________________________________^ 14LL | | ap 15LL | | } 16 | |_^ 17note: ...does not necessarily outlive the lifetime `'f` as defined on the function body at 7:37 18 --> $DIR/variadic-ffi-4.rs:7:37 19 | 20LL | pub unsafe extern "C" fn no_escape0<'f>(_: usize, ap: ...) -> VaListImpl<'f> { 21 | ^^ 22 23error[E0308]: mismatched types 24 --> $DIR/variadic-ffi-4.rs:12:5 25 | 26LL | ap 27 | ^^ lifetime mismatch 28 | 29 = note: expected struct `core::ffi::VaListImpl<'static>` 30 found struct `core::ffi::VaListImpl<'_>` 31note: the scope of call-site for function at 11:79... 32 --> $DIR/variadic-ffi-4.rs:11:79 33 | 34LL | pub unsafe extern "C" fn no_escape1(_: usize, ap: ...) -> VaListImpl<'static> { 35 | _______________________________________________________________________________^ 36LL | | ap 37LL | | } 38 | |_^ 39 = note: ...does not necessarily outlive the static lifetime 40 41error[E0495]: cannot infer an appropriate lifetime due to conflicting requirements 42 --> $DIR/variadic-ffi-4.rs:16:33 43 | 44LL | let _ = ap.with_copy(|ap| { ap }); 45 | ^^ 46 | 47note: first, the lifetime cannot outlive the anonymous lifetime #2 defined on the body at 16:26... 48 --> $DIR/variadic-ffi-4.rs:16:26 49 | 50LL | let _ = ap.with_copy(|ap| { ap }); 51 | ^^^^^^^^^^^ 52note: ...so that the expression is assignable 53 --> $DIR/variadic-ffi-4.rs:16:33 54 | 55LL | let _ = ap.with_copy(|ap| { ap }); 56 | ^^ 57 = note: expected `core::ffi::VaList<'_, '_>` 58 found `core::ffi::VaList<'_, '_>` 59note: but, the lifetime must be valid for the method call at 16:13... 60 --> $DIR/variadic-ffi-4.rs:16:13 61 | 62LL | let _ = ap.with_copy(|ap| { ap }); 63 | ^^^^^^^^^^^^^^^^^^^^^^^^^ 64note: ...so type `core::ffi::VaList<'_, '_>` of expression is valid during the expression 65 --> $DIR/variadic-ffi-4.rs:16:13 66 | 67LL | let _ = ap.with_copy(|ap| { ap }); 68 | ^^^^^^^^^^^^^^^^^^^^^^^^^ 69 70error[E0308]: mismatched types 71 --> $DIR/variadic-ffi-4.rs:20:12 72 | 73LL | *ap0 = ap1; 74 | ^^^ lifetime mismatch 75 | 76 = note: expected struct `core::ffi::VaListImpl<'_>` 77 found struct `core::ffi::VaListImpl<'_>` 78note: the scope of call-site for function at 19:87... 79 --> $DIR/variadic-ffi-4.rs:19:87 80 | 81LL | pub unsafe extern "C" fn no_escape3(_: usize, mut ap0: &mut VaListImpl, mut ap1: ...) { 82 | _______________________________________________________________________________________^ 83LL | | *ap0 = ap1; 84LL | | } 85 | |_^ 86note: ...does not necessarily outlive the anonymous lifetime #2 defined on the function body at 19:1 87 --> $DIR/variadic-ffi-4.rs:19:1 88 | 89LL | / pub unsafe extern "C" fn no_escape3(_: usize, mut ap0: &mut VaListImpl, mut ap1: ...) { 90LL | | *ap0 = ap1; 91LL | | } 92 | |_^ 93 94error[E0490]: a value of type `core::ffi::VaListImpl<'_>` is borrowed for too long 95 --> $DIR/variadic-ffi-4.rs:24:11 96 | 97LL | ap0 = &mut ap1; 98 | ^^^^^^^^ 99 | 100note: the type is valid for the anonymous lifetime #1 defined on the function body at 23:1 101 --> $DIR/variadic-ffi-4.rs:23:1 102 | 103LL | / pub unsafe extern "C" fn no_escape4(_: usize, ap0: &mut VaListImpl, mut ap1: ...) { 104LL | | ap0 = &mut ap1; 105LL | | 106LL | | 107LL | | 108LL | | } 109 | |_^ 110note: but the borrow lasts for the scope of call-site for function at 23:83 111 --> $DIR/variadic-ffi-4.rs:23:83 112 | 113LL | pub unsafe extern "C" fn no_escape4(_: usize, ap0: &mut VaListImpl, mut ap1: ...) { 114 | ___________________________________________________________________________________^ 115LL | | ap0 = &mut ap1; 116LL | | 117LL | | 118LL | | 119LL | | } 120 | |_^ 121 122error[E0308]: mismatched types 123 --> $DIR/variadic-ffi-4.rs:24:11 124 | 125LL | ap0 = &mut ap1; 126 | ^^^^^^^^ lifetime mismatch 127 | 128 = note: expected mutable reference `&mut core::ffi::VaListImpl<'_>` 129 found mutable reference `&mut core::ffi::VaListImpl<'_>` 130note: the scope of call-site for function at 23:83... 131 --> $DIR/variadic-ffi-4.rs:23:83 132 | 133LL | pub unsafe extern "C" fn no_escape4(_: usize, ap0: &mut VaListImpl, mut ap1: ...) { 134 | ___________________________________________________________________________________^ 135LL | | ap0 = &mut ap1; 136LL | | 137LL | | 138LL | | 139LL | | } 140 | |_^ 141note: ...does not necessarily outlive the anonymous lifetime #2 defined on the function body at 23:1 142 --> $DIR/variadic-ffi-4.rs:23:1 143 | 144LL | / pub unsafe extern "C" fn no_escape4(_: usize, ap0: &mut VaListImpl, mut ap1: ...) { 145LL | | ap0 = &mut ap1; 146LL | | 147LL | | 148LL | | 149LL | | } 150 | |_^ 151 152error[E0495]: cannot infer an appropriate lifetime for borrow expression due to conflicting requirements 153 --> $DIR/variadic-ffi-4.rs:24:11 154 | 155LL | ap0 = &mut ap1; 156 | ^^^^^^^^ 157 | 158note: first, the lifetime cannot outlive the scope of call-site for function at 23:83... 159 --> $DIR/variadic-ffi-4.rs:23:83 160 | 161LL | pub unsafe extern "C" fn no_escape4(_: usize, ap0: &mut VaListImpl, mut ap1: ...) { 162 | ___________________________________________________________________________________^ 163LL | | ap0 = &mut ap1; 164LL | | 165LL | | 166LL | | 167LL | | } 168 | |_^ 169note: ...so that the type `core::ffi::VaListImpl<'_>` is not borrowed for too long 170 --> $DIR/variadic-ffi-4.rs:24:11 171 | 172LL | ap0 = &mut ap1; 173 | ^^^^^^^^ 174note: but, the lifetime must be valid for the anonymous lifetime #1 defined on the function body at 23:1... 175 --> $DIR/variadic-ffi-4.rs:23:1 176 | 177LL | / pub unsafe extern "C" fn no_escape4(_: usize, ap0: &mut VaListImpl, mut ap1: ...) { 178LL | | ap0 = &mut ap1; 179LL | | 180LL | | 181LL | | 182LL | | } 183 | |_^ 184note: ...so that reference does not outlive borrowed content 185 --> $DIR/variadic-ffi-4.rs:24:11 186 | 187LL | ap0 = &mut ap1; 188 | ^^^^^^^^ 189 190error[E0308]: mismatched types 191 --> $DIR/variadic-ffi-4.rs:31:12 192 | 193LL | *ap0 = ap1.clone(); 194 | ^^^^^^^^^^^ lifetime mismatch 195 | 196 = note: expected struct `core::ffi::VaListImpl<'_>` 197 found struct `core::ffi::VaListImpl<'_>` 198note: the scope of call-site for function at 30:87... 199 --> $DIR/variadic-ffi-4.rs:30:87 200 | 201LL | pub unsafe extern "C" fn no_escape5(_: usize, mut ap0: &mut VaListImpl, mut ap1: ...) { 202 | _______________________________________________________________________________________^ 203LL | | *ap0 = ap1.clone(); 204LL | | } 205 | |_^ 206note: ...does not necessarily outlive the anonymous lifetime #2 defined on the function body at 30:1 207 --> $DIR/variadic-ffi-4.rs:30:1 208 | 209LL | / pub unsafe extern "C" fn no_escape5(_: usize, mut ap0: &mut VaListImpl, mut ap1: ...) { 210LL | | *ap0 = ap1.clone(); 211LL | | } 212 | |_^ 213 214error: aborting due to 8 previous errors 215 216Some errors have detailed explanations: E0308, E0495. 217For more information about an error, try `rustc --explain E0308`.