@@ -593,20 +593,20 @@ pub fn const_eval_provider<'a, 'tcx>(
593593
594594fn numeric_intrinsic < ' tcx > (
595595 name : & str ,
596- bytes : u128 ,
596+ bits : u128 ,
597597 kind : Primitive ,
598598) -> EvalResult < ' tcx , Scalar > {
599599 let defined = match kind {
600600 Primitive :: Int ( integer, _) => integer. size ( ) . bits ( ) as u8 ,
601- _ => bug ! ( "invalid `{}` argument: {:?}" , name, bytes ) ,
601+ _ => bug ! ( "invalid `{}` argument: {:?}" , name, bits ) ,
602602 } ;
603603 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 ( ) ,
609609 _ => bug ! ( "not a numeric intrinsic: {}" , name) ,
610610 } ;
611- Ok ( Scalar :: Bits { bits : bytes_out , defined } )
611+ Ok ( Scalar :: Bits { bits : bits_out , defined } )
612612}
0 commit comments