Skip to content

Commit

Permalink
Make try_from_target_usize method public
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
artemagvanian authored Jun 12, 2024
1 parent 8337ba9 commit 46391b7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion compiler/stable_mir/src/ty.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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))
}

Expand Down

0 comments on commit 46391b7

Please sign in to comment.