Skip to content

Commit 917985e

Browse files
committed
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.
1 parent cae1647 commit 917985e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/libcore/ffi.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@ impl<'a> VaList<'a> {
186186
reason = "the `c_variadic` feature has not been properly tested on \
187187
all supported platforms",
188188
issue = "27745")]
189-
pub unsafe fn copy<F, R>(&mut self, f: F) -> R
189+
pub unsafe fn copy<F, R>(&self, f: F) -> R
190190
where F: for<'copy> FnOnce(VaList<'copy>) -> R {
191191
#[cfg(any(all(not(target_arch = "aarch64"), not(target_arch = "powerpc"),
192192
not(target_arch = "x86_64")),

0 commit comments

Comments
 (0)