about summary refs log tree commit diff
path: root/src/liballoc/tests
diff options
context:
space:
mode:
authorRalf Jung <post@ralfj.de>2019-05-23 16:30:16 +0200
committerRalf Jung <post@ralfj.de>2019-05-23 16:30:54 +0200
commitf44b264447f0d1b42676e7ea99a04d140749f65b (patch)
treec9c7bd26bfd207e7513bac7f95534d21dd0501e2 /src/liballoc/tests
parentf688ba608923bdbf6b46ec65af2f6464b6233a75 (diff)
downloadrust-f44b264447f0d1b42676e7ea99a04d140749f65b.tar.gz
rust-f44b264447f0d1b42676e7ea99a04d140749f65b.zip
fix dangling reference in Vec::append
Diffstat (limited to 'src/liballoc/tests')
-rw-r--r--src/liballoc/tests/vec.rs5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/liballoc/tests/vec.rs b/src/liballoc/tests/vec.rs
index 545332bcd6a..3307bdf94f9 100644
--- a/src/liballoc/tests/vec.rs
+++ b/src/liballoc/tests/vec.rs
@@ -1,5 +1,3 @@
-#![cfg(not(miri))]
-
 use std::borrow::Cow;
 use std::mem::size_of;
 use std::{usize, isize};
@@ -763,6 +761,7 @@ fn from_into_inner() {
     it.next().unwrap();
     let vec = it.collect::<Vec<_>>();
     assert_eq!(vec, [2, 3]);
+    #[cfg(not(miri))] // Miri does not support comparing dangling pointers
     assert!(ptr != vec.as_ptr());
 }
 
@@ -971,6 +970,7 @@ fn test_reserve_exact() {
 }
 
 #[test]
+#[cfg(not(miri))] // Miri does not support signalling OOM
 fn test_try_reserve() {
 
     // These are the interesting cases:
@@ -1073,6 +1073,7 @@ fn test_try_reserve() {
 }
 
 #[test]
+#[cfg(not(miri))] // Miri does not support signalling OOM
 fn test_try_reserve_exact() {
 
     // This is exactly the same as test_try_reserve with the method changed.