Skip to content

Commit e26e42f

Browse files
committed
add missing Scalar::from_i128
1 parent 655600c commit e26e42f

File tree

1 file changed

+5
-0
lines changed
  • compiler/rustc_middle/src/mir/interpret

1 file changed

+5
-0
lines changed

compiler/rustc_middle/src/mir/interpret/value.rs

+5
Original file line numberDiff line numberDiff line change
@@ -196,6 +196,11 @@ impl<Prov> Scalar<Prov> {
196196
Self::from_int(i, Size::from_bits(64))
197197
}
198198

199+
#[inline]
200+
pub fn from_i128(i: i128) -> Self {
201+
Self::from_int(i, Size::from_bits(128))
202+
}
203+
199204
#[inline]
200205
pub fn from_target_isize(i: i64, cx: &impl HasDataLayout) -> Self {
201206
Self::from_int(i, cx.data_layout().pointer_size)

0 commit comments

Comments
 (0)