From 917985e7fe7721c43bd00c847b69828119b246a2 Mon Sep 17 00:00:00 2001 From: Dan Robertson Date: Thu, 3 Jan 2019 15:51:50 +0000 Subject: [PATCH] VaList::copy should not require a mutable ref VaList::copy does not need to take a mutable reference. The va_copy intrinsic takes a immutable reference. --- src/libcore/ffi.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libcore/ffi.rs b/src/libcore/ffi.rs index 899fae909467a..0717a88b6b8f3 100644 --- a/src/libcore/ffi.rs +++ b/src/libcore/ffi.rs @@ -186,7 +186,7 @@ impl<'a> VaList<'a> { reason = "the `c_variadic` feature has not been properly tested on \ all supported platforms", issue = "27745")] - pub unsafe fn copy(&mut self, f: F) -> R + pub unsafe fn copy(&self, f: F) -> R where F: for<'copy> FnOnce(VaList<'copy>) -> R { #[cfg(any(all(not(target_arch = "aarch64"), not(target_arch = "powerpc"), not(target_arch = "x86_64")),