File tree Expand file tree Collapse file tree 2 files changed +4
-3
lines changed Expand file tree Collapse file tree 2 files changed +4
-3
lines changed Original file line number Diff line number Diff line change 1- #![ cfg( not( miri) ) ]
2-
31use std:: borrow:: Cow ;
42use std:: mem:: size_of;
53use std:: { usize, isize} ;
@@ -763,6 +761,7 @@ fn from_into_inner() {
763761 it. next ( ) . unwrap ( ) ;
764762 let vec = it. collect :: < Vec < _ > > ( ) ;
765763 assert_eq ! ( vec, [ 2 , 3 ] ) ;
764+ #[ cfg( not( miri) ) ] // Miri does not support comparing dangling pointers
766765 assert ! ( ptr != vec. as_ptr( ) ) ;
767766}
768767
@@ -971,6 +970,7 @@ fn test_reserve_exact() {
971970}
972971
973972#[ test]
973+ #[ cfg( not( miri) ) ] // Miri does not support signalling OOM
974974fn test_try_reserve ( ) {
975975
976976 // These are the interesting cases:
@@ -1073,6 +1073,7 @@ fn test_try_reserve() {
10731073}
10741074
10751075#[ test]
1076+ #[ cfg( not( miri) ) ] // Miri does not support signalling OOM
10761077fn test_try_reserve_exact ( ) {
10771078
10781079 // This is exactly the same as test_try_reserve with the method changed.
Original file line number Diff line number Diff line change @@ -1094,7 +1094,7 @@ impl<T> Vec<T> {
10941094 let count = ( * other) . len ( ) ;
10951095 self . reserve ( count) ;
10961096 let len = self . len ( ) ;
1097- ptr:: copy_nonoverlapping ( other as * const T , self . get_unchecked_mut ( len) , count) ;
1097+ ptr:: copy_nonoverlapping ( other as * const T , self . as_mut_ptr ( ) . add ( len) , count) ;
10981098 self . len += count;
10991099 }
11001100
You can’t perform that action at this time.
0 commit comments