Skip to content

Commit d0a6805

Browse files
Allow unused attributes to avoid incremental bug
1 parent 9e35a28 commit d0a6805

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

Diff for: src/libcore/slice/mod.rs

+1
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@ impl<T> [T] {
6363
#[stable(feature = "rust1", since = "1.0.0")]
6464
#[inline]
6565
// SAFETY: const sound because we transmute out the length field as a usize (which it must be)
66+
#[allow(unused_attributes)]
6667
#[allow_internal_unstable(const_fn_union)]
6768
pub const fn len(&self) -> usize {
6869
unsafe {

Diff for: src/libcore/str/mod.rs

+1
Original file line numberDiff line numberDiff line change
@@ -2167,6 +2167,7 @@ impl str {
21672167
#[stable(feature = "rust1", since = "1.0.0")]
21682168
#[inline(always)]
21692169
// SAFETY: const sound because we transmute two types with the same layout
2170+
#[allow(unused_attributes)]
21702171
#[allow_internal_unstable(const_fn_union)]
21712172
pub const fn as_bytes(&self) -> &[u8] {
21722173
#[repr(C)]

0 commit comments

Comments
 (0)