File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -824,15 +824,15 @@ mod tests {
824
824
fn try_clone_oom ( ) {
825
825
let layout = Layout :: new :: < u8 > ( ) ;
826
826
let v =
827
- unsafe { Vec :: < u8 > :: from_raw_parts ( alloc ( layout) , core:: usize :: MAX , core:: usize :: MAX ) } ;
827
+ unsafe { Vec :: < u8 > :: from_raw_parts ( alloc ( layout) , core:: isize :: MAX as usize , core:: isize :: MAX as usize ) } ;
828
828
assert ! ( v. try_clone( ) . is_err( ) ) ;
829
829
}
830
830
831
831
#[ test]
832
832
fn tryvec_try_clone_oom ( ) {
833
833
let layout = Layout :: new :: < u8 > ( ) ;
834
834
let inner =
835
- unsafe { Vec :: < u8 > :: from_raw_parts ( alloc ( layout) , core:: usize :: MAX , core:: usize :: MAX ) } ;
835
+ unsafe { Vec :: < u8 > :: from_raw_parts ( alloc ( layout) , core:: isize :: MAX as usize , core:: isize :: MAX as usize ) } ;
836
836
let tv = TryVec { inner } ;
837
837
assert ! ( tv. try_clone( ) . is_err( ) ) ;
838
838
}
You can’t perform that action at this time.
0 commit comments