s/try_to_usize/try_to_machine_usize/

This commit is contained in:
Oliver Scherer 2020-07-11 09:28:10 +02:00
parent a871fedf98
commit 5c0e172f91
2 changed files with 4 additions and 4 deletions

View File

@ -68,7 +68,7 @@ pub fn try_to_bool(&self) -> Option<bool> {
}
}
pub fn try_to_usize(&self, tcx: TyCtxt<'tcx>) -> Option<u64> {
pub fn try_to_machine_usize(&self, tcx: TyCtxt<'tcx>) -> Option<u64> {
Some(self.try_to_bits(tcx.data_layout.pointer_size)? as u64)
}

View File

@ -2423,7 +2423,7 @@ pub fn try_eval_bool(&self, tcx: TyCtxt<'tcx>, param_env: ParamEnv<'tcx>) -> Opt
#[inline]
pub fn try_eval_usize(&self, tcx: TyCtxt<'tcx>, param_env: ParamEnv<'tcx>) -> Option<u64> {
self.val.eval(tcx, param_env).try_to_usize(tcx)
self.val.eval(tcx, param_env).try_to_machine_usize(tcx)
}
#[inline]
@ -2494,8 +2494,8 @@ pub fn try_to_bool(self) -> Option<bool> {
}
#[inline]
pub fn try_to_usize(self, tcx: TyCtxt<'tcx>) -> Option<u64> {
self.try_to_value()?.try_to_usize(tcx)
pub fn try_to_machine_usize(self, tcx: TyCtxt<'tcx>) -> Option<u64> {
self.try_to_value()?.try_to_machine_usize(tcx)
}
}