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.
This commit is contained in:
parent
8337ba9189
commit
46391b7dcd
@ -122,7 +122,7 @@ pub fn kind(&self) -> &TyConstKind {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// Creates an interned usize constant.
|
/// 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))
|
with(|cx| cx.try_new_ty_const_uint(val.into(), UintTy::Usize))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user