File tree Expand file tree Collapse file tree 1 file changed +2
-10
lines changed 
compiler/rustc_target/src/abi Expand file tree Collapse file tree 1 file changed +2
-10
lines changed Original file line number Diff line number Diff line change @@ -753,11 +753,7 @@ impl FieldsShape {
753753        match  * self  { 
754754            FieldsShape :: Primitive  => 0 , 
755755            FieldsShape :: Union ( count)  => count. get ( ) , 
756-             FieldsShape :: Array  {  count,  .. }  => { 
757-                 let  usize_count = count as  usize ; 
758-                 assert_eq ! ( usize_count as  u64 ,  count) ; 
759-                 usize_count
760-             } 
756+             FieldsShape :: Array  {  count,  .. }  => count. try_into ( ) . unwrap ( ) , 
761757            FieldsShape :: Arbitrary  {  ref  offsets,  .. }  => offsets. len ( ) , 
762758        } 
763759    } 
@@ -791,11 +787,7 @@ impl FieldsShape {
791787                unreachable ! ( "FieldsShape::memory_index: `Primitive`s have no fields" ) 
792788            } 
793789            FieldsShape :: Union ( _)  | FieldsShape :: Array  {  .. }  => i, 
794-             FieldsShape :: Arbitrary  {  ref  memory_index,  .. }  => { 
795-                 let  r = memory_index[ i] ; 
796-                 assert_eq ! ( r as  usize  as  u32 ,  r) ; 
797-                 r as  usize 
798-             } 
790+             FieldsShape :: Arbitrary  {  ref  memory_index,  .. }  => memory_index[ i] . try_into ( ) . unwrap ( ) , 
799791        } 
800792    } 
801793
 
 
   
 
     
   
   
          
    
    
     
    
      
     
     
    You can’t perform that action at this time.
  
 
    
  
    
      
        
     
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments