summaryrefslogtreecommitdiffstats
path: root/tests/ui/generic-associated-types/parse/trait-path-type-error-once-implemented.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui/generic-associated-types/parse/trait-path-type-error-once-implemented.rs')
-rw-r--r--tests/ui/generic-associated-types/parse/trait-path-type-error-once-implemented.rs11
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/ui/generic-associated-types/parse/trait-path-type-error-once-implemented.rs b/tests/ui/generic-associated-types/parse/trait-path-type-error-once-implemented.rs
new file mode 100644
index 000000000..1622b92aa
--- /dev/null
+++ b/tests/ui/generic-associated-types/parse/trait-path-type-error-once-implemented.rs
@@ -0,0 +1,11 @@
+trait X {
+ type Y<'a>;
+}
+
+const _: () = {
+ fn f2<'a>(arg : Box<dyn X<Y<1> = &'a ()>>) {}
+ //~^ ERROR this associated type takes 1 lifetime argument but 0 lifetime arguments
+ //~| ERROR this associated type takes 0 generic arguments but 1 generic argument
+};
+
+fn main() {}