@@ -47,8 +47,8 @@ fn test_tuples() {
4747
4848 match ( a. ty . info ( ) . kind , b. ty . info ( ) . kind ) {
4949 ( TypeKind :: Int ( a) , TypeKind :: Int ( b) ) => {
50- assert ! ( a. bit_width == 8 && a. signed) ;
51- assert ! ( b. bit_width == 8 && !b. signed) ;
50+ assert ! ( a. bits == 8 && a. signed) ;
51+ assert ! ( b. bits == 8 && !b. signed) ;
5252 }
5353 _ => unreachable ! ( ) ,
5454 }
@@ -70,27 +70,27 @@ fn test_primitives() {
7070
7171 let Type { kind : Int ( ty) , size, .. } = ( const { Type :: of :: < i32 > ( ) } ) else { panic ! ( ) } ;
7272 assert_eq ! ( size, Some ( 4 ) ) ;
73- assert_eq ! ( ty. bit_width , 32 ) ;
73+ assert_eq ! ( ty. bits , 32 ) ;
7474 assert ! ( ty. signed) ;
7575
7676 let Type { kind : Int ( ty) , size, .. } = ( const { Type :: of :: < isize > ( ) } ) else { panic ! ( ) } ;
7777 assert_eq ! ( size, Some ( size_of:: <isize >( ) ) ) ;
78- assert_eq ! ( ty. bit_width , size_of:: <isize >( ) * 8 ) ;
78+ assert_eq ! ( ty. bits as usize , size_of:: <isize >( ) * 8 ) ;
7979 assert ! ( ty. signed) ;
8080
8181 let Type { kind : Int ( ty) , size, .. } = ( const { Type :: of :: < u32 > ( ) } ) else { panic ! ( ) } ;
8282 assert_eq ! ( size, Some ( 4 ) ) ;
83- assert_eq ! ( ty. bit_width , 32 ) ;
83+ assert_eq ! ( ty. bits , 32 ) ;
8484 assert ! ( !ty. signed) ;
8585
8686 let Type { kind : Int ( ty) , size, .. } = ( const { Type :: of :: < usize > ( ) } ) else { panic ! ( ) } ;
8787 assert_eq ! ( size, Some ( size_of:: <usize >( ) ) ) ;
88- assert_eq ! ( ty. bit_width , size_of:: <usize >( ) * 8 ) ;
88+ assert_eq ! ( ty. bits as usize , size_of:: <usize >( ) * 8 ) ;
8989 assert ! ( !ty. signed) ;
9090
9191 let Type { kind : Float ( ty) , size, .. } = ( const { Type :: of :: < f32 > ( ) } ) else { panic ! ( ) } ;
9292 assert_eq ! ( size, Some ( 4 ) ) ;
93- assert_eq ! ( ty. bit_width , 32 ) ;
93+ assert_eq ! ( ty. bits , 32 ) ;
9494
9595 let Type { kind : Str ( _ty) , size, .. } = ( const { Type :: of :: < str > ( ) } ) else { panic ! ( ) } ;
9696 assert_eq ! ( size, None ) ;
0 commit comments