s/try_to_usize/try_to_machine_usize/
This commit is contained in:
parent
a871fedf98
commit
5c0e172f91
@ -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)
|
||||
}
|
||||
|
||||
|
@ -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)
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user