about summary refs log tree commit diff
path: root/src/libsyntax/parse/parser.rs
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2019-06-18 21:50:46 +0000
committerbors <bors@rust-lang.org>2019-06-18 21:50:46 +0000
commit605ea9d05c48957a291eec11eb7339788c3140ed (patch)
tree57b5bcd13ed3c9a67b234200959ca8a454edbebe /src/libsyntax/parse/parser.rs
parent04a3dd8a872633ca1e4c217d11f741cc35cb19a5 (diff)
parentb9ea653aee231114acbe6d4b3c7b1d692772d060 (diff)
downloadrust-605ea9d05c48957a291eec11eb7339788c3140ed.tar.gz
rust-605ea9d05c48957a291eec11eb7339788c3140ed.zip
Auto merge of #59625 - immunant:copy_variadics_typealias, r=eddyb
Refactor C FFI variadics to more closely match their C counterparts, and add Clone implementation

We had to make some changes to expose `va_copy` and `va_end` directly to users (mainly for C2Rust, but not exclusively):
- redefine the Rust variadic structures to more closely correspond to C: `VaList` now matches `va_list`, and `VaListImpl` matches `__va_list_tag`
- add `Clone` for `VaListImpl`
- add explicit `as_va_list()` conversion function from `VaListImpl` to `VaList`
- add deref coercion from `VaList` to `VaListImpl`
- add support for the `asmjs` target

All these changes were needed for use cases like:
```Rust
let mut ap2 = va_copy(ap);
vprintf(fmt, ap2);
va_end(&mut ap2);
```
Diffstat (limited to 'src/libsyntax/parse/parser.rs')
0 files changed, 0 insertions, 0 deletions