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