summaryrefslogtreecommitdiffstats
path: root/tests/ui/generic-associated-types/issue-67510.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui/generic-associated-types/issue-67510.rs')
-rw-r--r--tests/ui/generic-associated-types/issue-67510.rs10
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/ui/generic-associated-types/issue-67510.rs b/tests/ui/generic-associated-types/issue-67510.rs
new file mode 100644
index 000000000..ab5c25d74
--- /dev/null
+++ b/tests/ui/generic-associated-types/issue-67510.rs
@@ -0,0 +1,10 @@
+trait X {
+ type Y<'a>;
+}
+
+fn f(x: Box<dyn X<Y<'a> = &'a ()>>) {}
+//~^ ERROR: use of undeclared lifetime name `'a`
+//~| ERROR: use of undeclared lifetime name `'a`
+//~| ERROR: the trait `X` cannot be made into an object [E0038]
+
+fn main() {}