Skip to content

Commit

Permalink
Rollup merge of rust-lang#126362 - artemagvanian:patch-1, r=celinval
Browse files Browse the repository at this point in the history
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
workingjubilee authored Jun 13, 2024
2 parents d33ec8e + 46391b7 commit 3b10998
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 3b10998

Please sign in to comment.