From bb103b62d47fd6efedb581f26e7a89bec35caef2 Mon Sep 17 00:00:00 2001 From: Philip Herron Date: Mon, 19 Apr 2021 16:52:04 +0100 Subject: Add missing testcase --- gcc/testsuite/rust.test/xfail_compile/generics8.rs | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 gcc/testsuite/rust.test/xfail_compile/generics8.rs (limited to 'gcc') diff --git a/gcc/testsuite/rust.test/xfail_compile/generics8.rs b/gcc/testsuite/rust.test/xfail_compile/generics8.rs new file mode 100644 index 0000000..70bad1a --- /dev/null +++ b/gcc/testsuite/rust.test/xfail_compile/generics8.rs @@ -0,0 +1,15 @@ +struct Foo(A, B); + +impl Foo { + fn test(a: T) -> T { // { dg-error "duplicate definitions with name test" } + a + } +} + +impl Foo { + fn test() -> f32 { // { dg-error "duplicate definitions with name test" } + 123f32 + } +} + +fn main() {} -- cgit v1.1