summaryrefslogtreecommitdiffstats
path: root/src/test/ui/type-inference/unbounded-type-param-in-fn-with-assoc-type.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/ui/type-inference/unbounded-type-param-in-fn-with-assoc-type.rs')
-rw-r--r--src/test/ui/type-inference/unbounded-type-param-in-fn-with-assoc-type.rs9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/test/ui/type-inference/unbounded-type-param-in-fn-with-assoc-type.rs b/src/test/ui/type-inference/unbounded-type-param-in-fn-with-assoc-type.rs
new file mode 100644
index 000000000..81d054b3a
--- /dev/null
+++ b/src/test/ui/type-inference/unbounded-type-param-in-fn-with-assoc-type.rs
@@ -0,0 +1,9 @@
+#[allow(invalid_type_param_default)]
+
+fn foo<T, U = u64>() -> (T, U) {
+ panic!()
+}
+
+fn main() {
+ foo(); //~ ERROR type annotations needed
+}