@@ -244,7 +244,7 @@ impl VaList<'_> {
244244
245245#[ rustc_const_unstable( feature = "const_c_variadic" , issue = "151787" ) ]
246246impl < ' f > const Clone for VaList < ' f > {
247- #[ inline]
247+ #[ inline] // Avoid codegen when not used to help backends that don't support VaList.
248248 fn clone ( & self ) -> Self {
249249 // We only implement Clone and not Copy because some future target might not be able to
250250 // implement Copy (e.g. because it allocates). For the same reason we use an intrinsic
@@ -256,7 +256,7 @@ impl<'f> const Clone for VaList<'f> {
256256
257257#[ rustc_const_unstable( feature = "const_c_variadic" , issue = "151787" ) ]
258258impl < ' f > const Drop for VaList < ' f > {
259- #[ inline]
259+ #[ inline] // Avoid codegen when not used to help backends that don't support VaList.
260260 fn drop ( & mut self ) {
261261 // SAFETY: this variable argument list is being dropped, so won't be read from again.
262262 unsafe { va_end ( self ) }
@@ -327,7 +327,7 @@ impl<'f> VaList<'f> {
327327 ///
328328 /// Calling this function with an incompatible type, an invalid value, or when there
329329 /// are no more variable arguments, is unsound.
330- #[ inline]
330+ #[ inline] // Avoid codegen when not used to help backends that don't support VaList.
331331 #[ rustc_const_unstable( feature = "const_c_variadic" , issue = "151787" ) ]
332332 pub const unsafe fn arg < T : VaArgSafe > ( & mut self ) -> T {
333333 // SAFETY: the caller must uphold the safety contract for `va_arg`.
0 commit comments