diff options
Diffstat (limited to 'tests/ui/type/type-check/issue-40294.rs')
-rw-r--r-- | tests/ui/type/type-check/issue-40294.rs | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/ui/type/type-check/issue-40294.rs b/tests/ui/type/type-check/issue-40294.rs new file mode 100644 index 000000000..5493a4e5f --- /dev/null +++ b/tests/ui/type/type-check/issue-40294.rs @@ -0,0 +1,13 @@ +trait Foo: Sized { + fn foo(self); +} + +fn foo<'a,'b,T>(x: &'a T, y: &'b T) + where &'a T : Foo, //~ ERROR type annotations needed + &'b T : Foo +{ + x.foo(); + y.foo(); +} + +fn main() { } |