File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -68,7 +68,7 @@ impl<'tcx> ConstValue<'tcx> {
6868 }
6969 }
7070
71- pub fn try_to_usize ( & self , tcx : TyCtxt < ' tcx > ) -> Option < u64 > {
71+ pub fn try_to_machine_usize ( & self , tcx : TyCtxt < ' tcx > ) -> Option < u64 > {
7272 Some ( self . try_to_bits ( tcx. data_layout . pointer_size ) ? as u64 )
7373 }
7474
Original file line number Diff line number Diff line change @@ -2423,7 +2423,7 @@ impl<'tcx> Const<'tcx> {
24232423
24242424 #[ inline]
24252425 pub fn try_eval_usize ( & self , tcx : TyCtxt < ' tcx > , param_env : ParamEnv < ' tcx > ) -> Option < u64 > {
2426- self . val . eval ( tcx, param_env) . try_to_usize ( tcx)
2426+ self . val . eval ( tcx, param_env) . try_to_machine_usize ( tcx)
24272427 }
24282428
24292429 #[ inline]
@@ -2494,8 +2494,8 @@ impl<'tcx> ConstKind<'tcx> {
24942494 }
24952495
24962496 #[ inline]
2497- pub fn try_to_usize ( self , tcx : TyCtxt < ' tcx > ) -> Option < u64 > {
2498- self . try_to_value ( ) ?. try_to_usize ( tcx)
2497+ pub fn try_to_machine_usize ( self , tcx : TyCtxt < ' tcx > ) -> Option < u64 > {
2498+ self . try_to_value ( ) ?. try_to_machine_usize ( tcx)
24992499 }
25002500}
25012501
You can’t perform that action at this time.
0 commit comments