Skip to content

Commit

Permalink
Rollup merge of #98363 - RalfJung:btree-test-ref-alloc, r=thomcc
Browse files Browse the repository at this point in the history
remove use of &Alloc in btree tests

I missed these in #98233.

r? ``@thomcc``
  • Loading branch information
JohnTitor authored Jun 22, 2022
2 parents 0cac62d + 1ca8b69 commit db64923
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions library/alloc/src/collections/btree/node/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -68,10 +68,10 @@ fn test_splitpoint() {

#[test]
fn test_partial_eq() {
let mut root1 = NodeRef::new_leaf(&Global);
let mut root1 = NodeRef::new_leaf(Global);
root1.borrow_mut().push(1, ());
let mut root1 = NodeRef::new_internal(root1.forget_type(), &Global).forget_type();
let root2 = Root::new(&Global);
let mut root1 = NodeRef::new_internal(root1.forget_type(), Global).forget_type();
let root2 = Root::new(Global);
root1.reborrow().assert_back_pointers();
root2.reborrow().assert_back_pointers();

Expand All @@ -87,9 +87,9 @@ fn test_partial_eq() {
assert!(top_edge_1 == top_edge_1);
assert!(top_edge_1 != top_edge_2);

root1.pop_internal_level(&Global);
unsafe { root1.into_dying().deallocate_and_ascend(&Global) };
unsafe { root2.into_dying().deallocate_and_ascend(&Global) };
root1.pop_internal_level(Global);
unsafe { root1.into_dying().deallocate_and_ascend(Global) };
unsafe { root2.into_dying().deallocate_and_ascend(Global) };
}

#[test]
Expand Down

0 comments on commit db64923

Please sign in to comment.