Make try_from_target_usize method public

There is now no way to create a TyConst from an integer, so I propose making this method public unless there was a reason for keeping it otherwise.
This commit is contained in:
Artem Agvanian 2024-06-12 16:15:02 -07:00 committed by GitHub
parent 8337ba9189
commit 46391b7dcd
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -122,7 +122,7 @@ impl TyConst {
}
/// Creates an interned usize constant.
fn try_from_target_usize(val: u64) -> Result<Self, Error> {
pub fn try_from_target_usize(val: u64) -> Result<Self, Error> {
with(|cx| cx.try_new_ty_const_uint(val.into(), UintTy::Usize))
}