//! This crate provides the `AnyMap` type, a safe and convenient store for one value of each type.
 
 #![cfg_attr(feature = "unstable", feature(core, std_misc))]
-#![cfg_attr(test, feature(test))]
+#![cfg_attr(all(feature = "unstable", test), feature(test))]
 #![warn(missing_docs, unused_results)]
 
-#[cfg(test)]
+#[cfg(all(feature = "unstable", test))]
 extern crate test;
 
 use std::any::TypeId;
     }
 }
 
+#[cfg(feature = "unstable")]
 #[bench]
 fn bench_insertion(b: &mut ::test::Bencher) {
     b.iter(|| {
     })
 }
 
+#[cfg(feature = "unstable")]
 #[bench]
 fn bench_get_missing(b: &mut ::test::Bencher) {
     b.iter(|| {
     })
 }
 
+#[cfg(feature = "unstable")]
 #[bench]
 fn bench_get_present(b: &mut ::test::Bencher) {
     b.iter(|| {