about summary refs log tree commit diff
diff options
context:
space:
mode:
authorArtem Agvanian <artemagvanian@icloud.com>2024-06-12 16:15:02 -0700
committerGitHub <noreply@github.com>2024-06-12 16:15:02 -0700
commit46391b7dcd78062f247d515eb339e0a3b723da99 (patch)
tree95f60b9bea940654525226b4c22c8d801134cb05
parent8337ba9189de188e2ed417018af2bf17a57d51ac (diff)
downloadrust-46391b7dcd78062f247d515eb339e0a3b723da99.tar.gz
rust-46391b7dcd78062f247d515eb339e0a3b723da99.zip
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.
-rw-r--r--compiler/stable_mir/src/ty.rs2
1 files changed, 1 insertions, 1 deletions
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 @@ 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))
     }