File tree 2 files changed +4
-4
lines changed
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> {
68
68
}
69
69
}
70
70
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 > {
72
72
Some ( self . try_to_bits ( tcx. data_layout . pointer_size ) ? as u64 )
73
73
}
74
74
Original file line number Diff line number Diff line change @@ -2423,7 +2423,7 @@ impl<'tcx> Const<'tcx> {
2423
2423
2424
2424
#[ inline]
2425
2425
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)
2427
2427
}
2428
2428
2429
2429
#[ inline]
@@ -2494,8 +2494,8 @@ impl<'tcx> ConstKind<'tcx> {
2494
2494
}
2495
2495
2496
2496
#[ 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)
2499
2499
}
2500
2500
}
2501
2501
You can’t perform that action at this time.
0 commit comments