summary refs log tree commit diff
path: root/compiler/rustc_codegen_gcc/src/common.rs
diff options
context:
space:
mode:
authorRalf Jung <post@ralfj.de>2024-06-08 16:13:45 +0200
committerRalf Jung <post@ralfj.de>2024-06-10 13:43:16 +0200
commit3c57ea0df79c8ee2ad1ff99881f80ab87b186935 (patch)
tree8ae30dd0b4654f65ac8513fc5d141b958813fbf2 /compiler/rustc_codegen_gcc/src/common.rs
parent13423befc40fffe23ccc6dd06868142cff9428fe (diff)
downloadrust-3c57ea0df79c8ee2ad1ff99881f80ab87b186935.tar.gz
rust-3c57ea0df79c8ee2ad1ff99881f80ab87b186935.zip
ScalarInt: size mismatches are a bug, do not delay the panic
Diffstat (limited to 'compiler/rustc_codegen_gcc/src/common.rs')
-rw-r--r--compiler/rustc_codegen_gcc/src/common.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/rustc_codegen_gcc/src/common.rs b/compiler/rustc_codegen_gcc/src/common.rs
index 78d943192db..548c23cc794 100644
--- a/compiler/rustc_codegen_gcc/src/common.rs
+++ b/compiler/rustc_codegen_gcc/src/common.rs
@@ -166,7 +166,7 @@ impl<'gcc, 'tcx> ConstMethods<'tcx> for CodegenCx<'gcc, 'tcx> {
         let bitsize = if layout.is_bool() { 1 } else { layout.size(self).bits() };
         match cv {
             Scalar::Int(int) => {
-                let data = int.assert_bits(layout.size(self));
+                let data = int.to_bits(layout.size(self));
 
                 // FIXME(antoyo): there's some issues with using the u128 code that follows, so hard-code
                 // the paths for floating-point values.