Skip to content

Commit 85d8304

Browse files
actually remove test, it is not that new.
1 parent 625faa6 commit 85d8304

File tree

1 file changed

+0
-18
lines changed

1 file changed

+0
-18
lines changed

tests/pass/tree_borrows/tree-borrows.rs

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ fn main() {
1010
direct_mut_to_const_raw();
1111
local_addr_of_mut();
1212
returned_mut_is_usable();
13-
raw_children_of_refmut_can_alias();
1413

1514
// Stacked Borrows tests
1615
read_does_not_invalidate1();
@@ -356,20 +355,3 @@ fn write_does_not_invalidate_all_aliases() {
356355
other::lib2();
357356
assert_eq!(*x, 1337); // oops, the value changed! I guess not all pointers were invalidated
358357
}
359-
360-
fn raw_children_of_refmut_can_alias() {
361-
fn test_with_protector(x: &mut u8) {
362-
unsafe {
363-
let child1 = &raw mut *x;
364-
let child2 = &raw mut *x;
365-
// We create two raw aliases of `x`: they have the exact same
366-
// tag and can be used interchangeably.
367-
child1.write(1);
368-
child2.write(2);
369-
child1.write(1);
370-
child2.write(2);
371-
}
372-
}
373-
374-
test_with_protector(&mut 42u8);
375-
}

0 commit comments

Comments
 (0)