From 46391b7dcd78062f247d515eb339e0a3b723da99 Mon Sep 17 00:00:00 2001 From: Artem Agvanian Date: Wed, 12 Jun 2024 16:15:02 -0700 Subject: [PATCH] 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. --- compiler/stable_mir/src/ty.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/compiler/stable_mir/src/ty.rs b/compiler/stable_mir/src/ty.rs index bcbe87f7303..8c9824f8f8d 100644 --- a/compiler/stable_mir/src/ty.rs +++ b/compiler/stable_mir/src/ty.rs @@ -122,7 +122,7 @@ pub fn kind(&self) -> &TyConstKind { } /// Creates an interned usize constant. - fn try_from_target_usize(val: u64) -> Result { + pub fn try_from_target_usize(val: u64) -> Result { with(|cx| cx.try_new_ty_const_uint(val.into(), UintTy::Usize)) }