From 979b38d4bef30787cdfda445045755832e02503c Mon Sep 17 00:00:00 2001 From: Philip Herron Date: Thu, 31 Aug 2023 11:50:31 +0100 Subject: gccrs: fix bug in the iterator testcase gcc/testsuite/ChangeLog: * rust/compile/iterators1.rs: this should be casting to the $ty Signed-off-by: Philip Herron --- gcc/testsuite/rust/compile/iterators1.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'gcc') diff --git a/gcc/testsuite/rust/compile/iterators1.rs b/gcc/testsuite/rust/compile/iterators1.rs index 33736f1..35fea5a 100644 --- a/gcc/testsuite/rust/compile/iterators1.rs +++ b/gcc/testsuite/rust/compile/iterators1.rs @@ -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) } } -- cgit v1.1