Allow unused attributes to avoid incremental bug
This commit is contained in:
@@ -63,6 +63,7 @@ impl<T> [T] {
|
|||||||
#[stable(feature = "rust1", since = "1.0.0")]
|
#[stable(feature = "rust1", since = "1.0.0")]
|
||||||
#[inline]
|
#[inline]
|
||||||
// SAFETY: const sound because we transmute out the length field as a usize (which it must be)
|
// 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)]
|
#[allow_internal_unstable(const_fn_union)]
|
||||||
pub const fn len(&self) -> usize {
|
pub const fn len(&self) -> usize {
|
||||||
unsafe {
|
unsafe {
|
||||||
|
|||||||
@@ -2167,6 +2167,7 @@ impl str {
|
|||||||
#[stable(feature = "rust1", since = "1.0.0")]
|
#[stable(feature = "rust1", since = "1.0.0")]
|
||||||
#[inline(always)]
|
#[inline(always)]
|
||||||
// SAFETY: const sound because we transmute two types with the same layout
|
// SAFETY: const sound because we transmute two types with the same layout
|
||||||
|
#[allow(unused_attributes)]
|
||||||
#[allow_internal_unstable(const_fn_union)]
|
#[allow_internal_unstable(const_fn_union)]
|
||||||
pub const fn as_bytes(&self) -> &[u8] {
|
pub const fn as_bytes(&self) -> &[u8] {
|
||||||
#[repr(C)]
|
#[repr(C)]
|
||||||
|
|||||||
Reference in New Issue
Block a user