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.
This commit is contained in:
bluss
2017-07-29 12:38:50 +02:00
parent 2abdaf137e
commit 28b2543ae0
-11
View File
@@ -234,17 +234,6 @@ fn test_insert() {
assert_eq!(v.insert(2, 1), Some(1)); 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] #[test]
fn test_into_inner_1() { fn test_into_inner_1() {
let mut v = ArrayVec::from([1, 2]); let mut v = ArrayVec::from([1, 2]);