diff options
Diffstat (limited to 'gcc/testsuite/rust/compile/generics11.rs')
-rw-r--r-- | gcc/testsuite/rust/compile/generics11.rs | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/gcc/testsuite/rust/compile/generics11.rs b/gcc/testsuite/rust/compile/generics11.rs new file mode 100644 index 0000000..4d3b9e1 --- /dev/null +++ b/gcc/testsuite/rust/compile/generics11.rs @@ -0,0 +1,12 @@ +struct Foo<T>(T, bool); + +impl<T> Foo<T> { + fn test() -> i32 { + 123 + } +} + +fn main() { + let a = Foo::test(); + // { dg-error "type annotations needed" "" { target *-*-* } .-1 } +} |