aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbors[bot] <26634292+bors[bot]@users.noreply.github.com>2021-05-11 10:05:43 +0000
committerGitHub <noreply@github.com>2021-05-11 10:05:43 +0000
commit299d98d8e6fcb8d014b299adc426d93cf0c8050f (patch)
tree6b020bbb0ed2b7e3d3914780194325b3ea36d43d
parent7c45fcb6e23f86a7f69ef4136099d5a8541afde6 (diff)
parentf396811a9711bf62a46849c24711676ef8d6f37a (diff)
downloadgcc-299d98d8e6fcb8d014b299adc426d93cf0c8050f.zip
gcc-299d98d8e6fcb8d014b299adc426d93cf0c8050f.tar.gz
gcc-299d98d8e6fcb8d014b299adc426d93cf0c8050f.tar.bz2
Merge #422
422: Add testcase to cover case where type param cannot be infered r=philberty a=philberty When the Type paramater is not used we cannot infer the type and we should error this was fixed in #375. Fixes #420 Co-authored-by: Philip Herron <philip.herron@embecosm.com>
-rw-r--r--gcc/testsuite/rust.test/xfail_compile/generics12.rs6
1 files changed, 6 insertions, 0 deletions
diff --git a/gcc/testsuite/rust.test/xfail_compile/generics12.rs b/gcc/testsuite/rust.test/xfail_compile/generics12.rs
new file mode 100644
index 0000000..f1ac8b0
--- /dev/null
+++ b/gcc/testsuite/rust.test/xfail_compile/generics12.rs
@@ -0,0 +1,6 @@
+fn main() {
+ bar();
+ // { dg-error "type annotations needed" "" { target *-*-* } .-1 }
+}
+
+fn bar<T>() {}