Rollup merge of #126362 - artemagvanian:patch-1, r=celinval

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:
Jubilee 2024-06-12 20:03:23 -07:00 committed by GitHub
commit 3b109987e1
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))
}