[COMMITTED 17/25] gccrs: Add testcase to show issue is already fixed

arthur.cohen@embecosm.com arthur.cohen@embecosm.com
Wed Feb 7 11:44:03 GMT 2024


From: Philip Herron <herron.philip@googlemail.com>

Fixes #2782

gcc/testsuite/ChangeLog:

	* rust/compile/issue-2782.rs: New test.

Signed-off-by: Philip Herron <herron.philip@googlemail.com>
---
 gcc/testsuite/rust/compile/issue-2782.rs | 12 ++++++++++++
 1 file changed, 12 insertions(+)
 create mode 100644 gcc/testsuite/rust/compile/issue-2782.rs

diff --git a/gcc/testsuite/rust/compile/issue-2782.rs b/gcc/testsuite/rust/compile/issue-2782.rs
new file mode 100644
index 00000000000..e199c882c86
--- /dev/null
+++ b/gcc/testsuite/rust/compile/issue-2782.rs
@@ -0,0 +1,12 @@
+#[lang = "sized"]
+pub trait Sized {}
+
+struct S<T>(T);
+
+impl S<u8> {
+    fn foo<U>() {}
+}
+
+fn main() {
+    S::foo::<i32>();
+}
-- 
2.42.1



More information about the Gcc-rust mailing list