File tree 2 files changed +4
-3
lines changed
2 files changed +4
-3
lines changed Original file line number Diff line number Diff line change 1
- #![ cfg( not( miri) ) ]
2
-
3
1
use std:: borrow:: Cow ;
4
2
use std:: mem:: size_of;
5
3
use std:: { usize, isize} ;
@@ -763,6 +761,7 @@ fn from_into_inner() {
763
761
it. next ( ) . unwrap ( ) ;
764
762
let vec = it. collect :: < Vec < _ > > ( ) ;
765
763
assert_eq ! ( vec, [ 2 , 3 ] ) ;
764
+ #[ cfg( not( miri) ) ] // Miri does not support comparing dangling pointers
766
765
assert ! ( ptr != vec. as_ptr( ) ) ;
767
766
}
768
767
@@ -971,6 +970,7 @@ fn test_reserve_exact() {
971
970
}
972
971
973
972
#[ test]
973
+ #[ cfg( not( miri) ) ] // Miri does not support signalling OOM
974
974
fn test_try_reserve ( ) {
975
975
976
976
// These are the interesting cases:
@@ -1073,6 +1073,7 @@ fn test_try_reserve() {
1073
1073
}
1074
1074
1075
1075
#[ test]
1076
+ #[ cfg( not( miri) ) ] // Miri does not support signalling OOM
1076
1077
fn test_try_reserve_exact ( ) {
1077
1078
1078
1079
// 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> {
1094
1094
let count = ( * other) . len ( ) ;
1095
1095
self . reserve ( count) ;
1096
1096
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) ;
1098
1098
self . len += count;
1099
1099
}
1100
1100
You can’t perform that action at this time.
0 commit comments