about summary refs log tree commit diff
diff options
context:
space:
mode:
authorTyler Mandry <tmandry@gmail.com>2019-10-05 21:55:01 -0700
committerGitHub <noreply@github.com>2019-10-05 21:55:01 -0700
commitf80656cf7cf07c8c9b28c84e392e3ce3f0b65e11 (patch)
treebdbfaa9ae516c9d260085c22a34bd5019e67efe7
parent2c8cbcca543c9aeb7ead6bebd8951cc99c36c67d (diff)
parentd0a6805b0e2711b38a9663a88d23699dd328abb6 (diff)
downloadrust-f80656cf7cf07c8c9b28c84e392e3ce3f0b65e11.tar.gz
rust-f80656cf7cf07c8c9b28c84e392e3ce3f0b65e11.zip
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.
-rw-r--r--src/libcore/slice/mod.rs1
-rw-r--r--src/libcore/str/mod.rs1
2 files changed, 2 insertions, 0 deletions
diff --git a/src/libcore/slice/mod.rs b/src/libcore/slice/mod.rs
index b5462d98837..4e79ea81204 100644
--- a/src/libcore/slice/mod.rs
+++ b/src/libcore/slice/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 {
diff --git a/src/libcore/str/mod.rs b/src/libcore/str/mod.rs
index ece61dde490..885696e5acf 100644
--- a/src/libcore/str/mod.rs
+++ b/src/libcore/str/mod.rs
@@ -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)]