Skip to content

Commit f320add

Browse files
authored
Rollup merge of #65106 - Mark-Simulacrum:unused-attr-allow, r=Centril
Allow unused attributes to avoid incremental bug cc #65023 This isn't labeled as fixing that issue because it's not really a fix, just a patch.
2 parents 7f520da + d0a6805 commit f320add

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

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 {

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)