about summary refs log tree commit diff
path: root/src/liballoc
diff options
context:
space:
mode:
authorZack M. Davis <code@zackmdavis.net>2018-03-10 16:23:28 -0800
committerZack M. Davis <code@zackmdavis.net>2018-04-28 20:32:49 -0700
commit3dbdccc6a9c1ead58325d415381b25c676386c34 (patch)
treee2d36c4e257ccb3f601d9860fafec5d42e64ea28 /src/liballoc
parentc659faba8d8a7e21eeddbf446c9101bb945e9f0c (diff)
downloadrust-3dbdccc6a9c1ead58325d415381b25c676386c34.tar.gz
rust-3dbdccc6a9c1ead58325d415381b25c676386c34.zip
stabilize `#[must_use]` for functions and must-use operators
This is in the matter of RFC 1940 and tracking issue #43302.
Diffstat (limited to 'src/liballoc')
-rw-r--r--src/liballoc/lib.rs2
-rw-r--r--src/liballoc/tests/slice.rs1
2 files changed, 2 insertions, 1 deletions
diff --git a/src/liballoc/lib.rs b/src/liballoc/lib.rs
index 021395d0c82..fa74352c23c 100644
--- a/src/liballoc/lib.rs
+++ b/src/liballoc/lib.rs
@@ -96,7 +96,7 @@
 #![feature(dropck_eyepatch)]
 #![feature(exact_size_is_empty)]
 #![feature(fmt_internals)]
-#![feature(fn_must_use)]
+#![cfg_attr(stage0, feature(fn_must_use))]
 #![feature(from_ref)]
 #![feature(fundamental)]
 #![feature(lang_items)]
diff --git a/src/liballoc/tests/slice.rs b/src/liballoc/tests/slice.rs
index 99d9c51efc7..6fd0b33f02a 100644
--- a/src/liballoc/tests/slice.rs
+++ b/src/liballoc/tests/slice.rs
@@ -1282,6 +1282,7 @@ fn test_box_slice_clone() {
 }
 
 #[test]
+#[allow(unused_must_use)] // here, we care about the side effects of `.clone()`
 #[cfg_attr(target_os = "emscripten", ignore)]
 fn test_box_slice_clone_panics() {
     use std::sync::Arc;