diff options
| author | Mazdak Farrokhzad <twingoow@gmail.com> | 2019-08-29 05:32:58 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-08-29 05:32:58 +0200 |
| commit | 73910092365b67fa897bc828b7a4ffa1f2c776cf (patch) | |
| tree | 5c5f821faca76cb44f2cc891746a1cbff1f2fa4b /src/libsyntax/parse/parser | |
| parent | e3028dbda8bf32495efe78f268461ff489bb905d (diff) | |
| parent | 080fdb8184cea898f48818312a7645007c8b7594 (diff) | |
| download | rust-73910092365b67fa897bc828b7a4ffa1f2c776cf.tar.gz rust-73910092365b67fa897bc828b7a4ffa1f2c776cf.zip | |
Rollup merge of #63980 - DutchGhost:master, r=cramertj
add missing `#[repr(C)]` on the Slices union Adds the `#[repr(C)]` attribute to the `Slices` union used to convert an `&str` into a `&[u8]`. Without the attribute, the union has an unspecified layout: https://doc.rust-lang.org/reference/types/union.html, so performing the 'transmute' is unsound without the attribute (as far as I understand). The `Repr` union, used for converting a raw ptr + len to a slice has this attribute as well: https://github.com/rust-lang/rust/blob/master/src/libcore/ptr/mod.rs#L211-#L216
Diffstat (limited to 'src/libsyntax/parse/parser')
0 files changed, 0 insertions, 0 deletions
