Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make try_from_target_usize method public #126362

Merged
merged 1 commit into from
Jun 13, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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.
  • Loading branch information
artemagvanian authored Jun 12, 2024
commit 46391b7dcd78062f247d515eb339e0a3b723da99
2 changes: 1 addition & 1 deletion compiler/stable_mir/src/ty.rs
Original file line number Diff line number Diff line change
@@ -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))
}