Skip to content

Commit dfc1037

Browse files
authored
Rollup merge of rust-lang#57311 - dlrobertson:fix_valist_copy, r=KodrAus
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.
2 parents 952af5e + 917985e commit dfc1037

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)