diff options
| author | kennytm <kennytm@gmail.com> | 2019-01-05 23:56:55 +0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-01-05 23:56:55 +0800 |
| commit | dfc1037757ed5d78c982fbe5a8daf3d8846027da (patch) | |
| tree | abccef0152912098c2f05d7e5211fa29ec5f278a /src/libcore | |
| parent | 952af5e89898c1a019b25d367aca00d36b326d3d (diff) | |
| parent | 917985e7fe7721c43bd00c847b69828119b246a2 (diff) | |
| download | rust-dfc1037757ed5d78c982fbe5a8daf3d8846027da.tar.gz rust-dfc1037757ed5d78c982fbe5a8daf3d8846027da.zip | |
Rollup merge of #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.
Diffstat (limited to 'src/libcore')
| -rw-r--r-- | src/libcore/ffi.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libcore/ffi.rs b/src/libcore/ffi.rs index 899fae90946..0717a88b6b8 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<F, R>(&mut self, f: F) -> R + pub unsafe fn copy<F, R>(&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")), |
