@@ -593,20 +593,20 @@ pub fn const_eval_provider<'a, 'tcx>(
593
593
594
594
fn numeric_intrinsic < ' tcx > (
595
595
name : & str ,
596
- bytes : u128 ,
596
+ bits : u128 ,
597
597
kind : Primitive ,
598
598
) -> EvalResult < ' tcx , Scalar > {
599
599
let defined = match kind {
600
600
Primitive :: Int ( integer, _) => integer. size ( ) . bits ( ) as u8 ,
601
- _ => bug ! ( "invalid `{}` argument: {:?}" , name, bytes ) ,
601
+ _ => bug ! ( "invalid `{}` argument: {:?}" , name, bits ) ,
602
602
} ;
603
603
let extra = 128 - defined as u128 ;
604
- let bytes_out = match name {
605
- "ctpop" => bytes . count_ones ( ) as u128 ,
606
- "ctlz" => bytes . leading_zeros ( ) as u128 - extra,
607
- "cttz" => ( bytes << extra) . trailing_zeros ( ) as u128 - extra,
608
- "bswap" => ( bytes << extra) . swap_bytes ( ) ,
604
+ let bits_out = match name {
605
+ "ctpop" => bits . count_ones ( ) as u128 ,
606
+ "ctlz" => bits . leading_zeros ( ) as u128 - extra,
607
+ "cttz" => ( bits << extra) . trailing_zeros ( ) as u128 - extra,
608
+ "bswap" => ( bits << extra) . swap_bytes ( ) ,
609
609
_ => bug ! ( "not a numeric intrinsic: {}" , name) ,
610
610
} ;
611
- Ok ( Scalar :: Bits { bits : bytes_out , defined } )
611
+ Ok ( Scalar :: Bits { bits : bits_out , defined } )
612
612
}
0 commit comments