]> git.lizzy.rs Git - rust.git/blobdiff - library/alloc/tests/arc.rs
Rollup merge of #104626 - reez12g:issue-99144-2, r=jyn514
[rust.git] / library / alloc / tests / arc.rs
index eb379e4d6a10f9edfba773e77377f3cd4169a289..ce40b5c9b0a0d3a5948635c131dc1b353adbbcfb 100644 (file)
@@ -210,18 +210,3 @@ fn hmm<'a>(val: &'a mut Weak<&'a str>) -> Weak<&'a str> {
     // `val` dropped here while still borrowed
     // borrow might be used here, when `val` is dropped and runs the `Drop` code for type `std::sync::Weak`
 }
-
-#[test]
-fn arc_from_vec_opt() {
-    let mut v = Vec::with_capacity(64);
-    v.push(0usize);
-    let addr = v.as_ptr().cast::<u8>();
-    let arc: Arc<[_]> = v.into();
-    unsafe {
-        assert_eq!(
-            arc.as_ptr().cast::<u8>().offset_from(addr),
-            (std::mem::size_of::<usize>() * 2) as isize,
-            "Vector allocation not reused"
-        );
-    }
-}