]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
gccrs: fix bug in the iterator testcase
authorPhilip Herron <herron.philip@googlemail.com>
Thu, 31 Aug 2023 10:50:31 +0000 (11:50 +0100)
committerArthur Cohen <arthur.cohen@embecosm.com>
Tue, 16 Jan 2024 18:04:30 +0000 (19:04 +0100)
gcc/testsuite/ChangeLog:

* rust/compile/iterators1.rs: this should be casting to the $ty

Signed-off-by: Philip Herron <herron.philip@googlemail.com>
gcc/testsuite/rust/compile/iterators1.rs

index 33736f169d3617e50b78c17a42119b5f8b712bf9..35fea5a049387804a8e131c0fcf33655d8e18859 100644 (file)
@@ -264,7 +264,7 @@ macro_rules! impl_uint {
                 }
 
                 pub fn overflowing_add(self, rhs: Self) -> (Self, bool) {
-                    let (a, b) = unsafe { intrinsics::add_with_overflow(self as i32, rhs as i32) };
+                    let (a, b) = unsafe { intrinsics::add_with_overflow(self as $ty, rhs as $ty) };
                     (a as Self, b)
                 }
             }