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