summaryrefslogtreecommitdiffstats
path: root/tests/ui/generic-associated-types/issue-71176.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui/generic-associated-types/issue-71176.rs')
-rw-r--r--tests/ui/generic-associated-types/issue-71176.rs18
1 files changed, 18 insertions, 0 deletions
diff --git a/tests/ui/generic-associated-types/issue-71176.rs b/tests/ui/generic-associated-types/issue-71176.rs
new file mode 100644
index 000000000..f0e162d82
--- /dev/null
+++ b/tests/ui/generic-associated-types/issue-71176.rs
@@ -0,0 +1,18 @@
+trait Provider {
+ type A<'a>;
+}
+
+impl Provider for () {
+ type A<'a> = ();
+}
+
+struct Holder<B> {
+ inner: Box<dyn Provider<A = B>>,
+ //~^ ERROR: missing generics for associated type
+}
+
+fn main() {
+ Holder {
+ inner: Box::new(()),
+ };
+}