From 28b2543ae0ca9ee69e5c388e6f57734a7a75978b Mon Sep 17 00:00:00 2001 From: bluss Date: Sat, 29 Jul 2017 12:38:50 +0200 Subject: [PATCH] Remove failing test (with optimizations) What the test was doing was simply UB and we can't expect rustc to make sense of it. The test was failing with optimizations on, yet a closer look says arrayvec is still working as it should. So remove the broken test. --- tests/tests.rs | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/tests/tests.rs b/tests/tests.rs index 8aa43f3..f2dede2 100644 --- a/tests/tests.rs +++ b/tests/tests.rs @@ -234,17 +234,6 @@ fn test_insert() { assert_eq!(v.insert(2, 1), Some(1)); } -#[test] -fn test_in_option() { - // Sanity check that we are sound w.r.t Option & non-nullable layout optimization. - let mut v = Some(ArrayVec::<[&i32; 1]>::new()); - assert!(v.is_some()); - unsafe { - *v.as_mut().unwrap().get_unchecked_mut(0) = mem::zeroed(); - } - assert!(v.is_some()); -} - #[test] fn test_into_inner_1() { let mut v = ArrayVec::from([1, 2]);