Skip to content
Permalink
Browse files

Allow unused attributes to avoid incremental bug

  • Loading branch information...
Mark-Simulacrum committed Oct 4, 2019
1 parent 9e35a28 commit d0a6805b0e2711b38a9663a88d23699dd328abb6
Showing with 2 additions and 0 deletions.
  1. +1 −0 src/libcore/slice/mod.rs
  2. +1 −0 src/libcore/str/mod.rs
@@ -63,6 +63,7 @@ impl<T> [T] {
#[stable(feature = "rust1", since = "1.0.0")]
#[inline]
// SAFETY: const sound because we transmute out the length field as a usize (which it must be)
#[allow(unused_attributes)]
#[allow_internal_unstable(const_fn_union)]
pub const fn len(&self) -> usize {
unsafe {
@@ -2167,6 +2167,7 @@ impl str {
#[stable(feature = "rust1", since = "1.0.0")]
#[inline(always)]
// SAFETY: const sound because we transmute two types with the same layout
#[allow(unused_attributes)]
#[allow_internal_unstable(const_fn_union)]
pub const fn as_bytes(&self) -> &[u8] {
#[repr(C)]

0 comments on commit d0a6805

Please sign in to comment.
You can’t perform that action at this time.