From e26e42fabee2c3dc2060fbfe03856f8ab16eb762 Mon Sep 17 00:00:00 2001 From: Ralf Jung Date: Sat, 8 Jun 2024 14:48:32 +0200 Subject: [PATCH] add missing Scalar::from_i128 --- compiler/rustc_middle/src/mir/interpret/value.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/compiler/rustc_middle/src/mir/interpret/value.rs b/compiler/rustc_middle/src/mir/interpret/value.rs index c5c87c506b7..85357265687 100644 --- a/compiler/rustc_middle/src/mir/interpret/value.rs +++ b/compiler/rustc_middle/src/mir/interpret/value.rs @@ -196,6 +196,11 @@ pub fn from_i64(i: i64) -> Self { Self::from_int(i, Size::from_bits(64)) } + #[inline] + pub fn from_i128(i: i128) -> Self { + Self::from_int(i, Size::from_bits(128)) + } + #[inline] pub fn from_target_isize(i: i64, cx: &impl HasDataLayout) -> Self { Self::from_int(i, cx.data_layout().pointer_size)