about summary refs log tree commit diff
path: root/library/alloc/tests
diff options
context:
space:
mode:
authorMatthias Krüger <matthias.krueger@famsik.de>2023-03-29 21:19:50 +0200
committerGitHub <noreply@github.com>2023-03-29 21:19:50 +0200
commitc62bb46fb32d00b448105590d0f9bd5782da7f71 (patch)
tree77bd51dc5974ce68f44762b9dd620800f1e18ab9 /library/alloc/tests
parent80e988d7a6494caffe162578760ed390cd47c0cc (diff)
parente34ad763639eda0e6174fc89ee31d808ec0d1536 (diff)
Rollup merge of #109693 - workingjubilee:maybe-unconstify-alloc, r=fee1-dead
Remove ~const from alloc

There is currently an effort underway to stop using `~const Trait`, temporarily, so as to refactor the logic underlying const traits with relative ease. This means it has to go from the standard library, as well.

I have taken the initial step of just removing these impls from alloc, as removing them from core is a much more tangled task. In addition, all of these implementations are one more-or-less logically-connected group, so reverting their deconstification as a group seems like it will also be sensible.

r? `@fee1-dead`
Diffstat (limited to 'library/alloc/tests')
-rw-r--r--library/alloc/tests/boxed.rs15
-rw-r--r--library/alloc/tests/lib.rs1
2 files changed, 0 insertions, 16 deletions
diff --git a/library/alloc/tests/boxed.rs b/library/alloc/tests/boxed.rs
index af49826ff30..68ebd8e35ee 100644
--- a/library/alloc/tests/boxed.rs
+++ b/library/alloc/tests/boxed.rs
@@ -179,18 +179,3 @@ unsafe impl const Allocator for ConstAllocator {
         self
     }
 }
-
-#[test]
-fn const_box() {
-    const VALUE: u32 = {
-        let mut boxed = Box::new_in(1u32, ConstAllocator);
-        assert!(*boxed == 1);
-
-        *boxed = 42;
-        assert!(*boxed == 42);
-
-        *Box::leak(boxed)
-    };
-
-    assert!(VALUE == 42);
-}
diff --git a/library/alloc/tests/lib.rs b/library/alloc/tests/lib.rs
index 966cf575116..c27ca642e9b 100644
--- a/library/alloc/tests/lib.rs
+++ b/library/alloc/tests/lib.rs
@@ -3,7 +3,6 @@
 #![feature(assert_matches)]
 #![feature(btree_drain_filter)]
 #![feature(cow_is_borrowed)]
-#![feature(const_box)]
 #![feature(const_convert)]
 #![feature(const_cow_is_borrowed)]
 #![feature(const_heap)]