diff options
Diffstat (limited to 'tests/ui/generic-associated-types/issue-102114.rs')
-rw-r--r-- | tests/ui/generic-associated-types/issue-102114.rs | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/tests/ui/generic-associated-types/issue-102114.rs b/tests/ui/generic-associated-types/issue-102114.rs new file mode 100644 index 000000000..de31737ef --- /dev/null +++ b/tests/ui/generic-associated-types/issue-102114.rs @@ -0,0 +1,16 @@ +trait A { + type B<'b>; + fn a() -> Self::B<'static>; +} + +struct C; + +struct Wrapper<T>(T); + +impl A for C { + type B<T> = Wrapper<T>; + //~^ ERROR type `B` has 1 type parameter but its trait declaration has 0 type parameters + fn a() -> Self::B<'static> {} +} + +fn main() {} |