add missing #[repr(C)] on a union

This commit is contained in:
Dodo 2019-08-28 17:38:24 +02:00
parent ac21131f78
commit 080fdb8184

View file

@ -2170,6 +2170,7 @@ impl str {
#[inline(always)]
#[rustc_const_unstable(feature="const_str_as_bytes")]
pub const fn as_bytes(&self) -> &[u8] {
#[repr(C)]
union Slices<'a> {
str: &'a str,
slice: &'a [u8],