Skip to content

Commit

Permalink
add missing #[repr(C)] on a union
Browse files Browse the repository at this point in the history
  • Loading branch information
DutchGhost committed Aug 28, 2019
1 parent ac21131 commit 080fdb8
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/libcore/str/mod.rs
Expand Up @@ -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],
Expand Down

0 comments on commit 080fdb8

Please sign in to comment.