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 {
824824 fn try_clone_oom ( ) {
825825 let layout = Layout :: new :: < u8 > ( ) ;
826826 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 ) } ;
828828 assert ! ( v. try_clone( ) . is_err( ) ) ;
829829 }
830830
831831 #[ test]
832832 fn tryvec_try_clone_oom ( ) {
833833 let layout = Layout :: new :: < u8 > ( ) ;
834834 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 ) } ;
836836 let tv = TryVec { inner } ;
837837 assert ! ( tv. try_clone( ) . is_err( ) ) ;
838838 }
You can’t perform that action at this time.
0 commit comments