From 218caa410aa38c29984be31a5229b9fa717560ee Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Wed, 17 Apr 2024 14:19:13 +0200 Subject: Merging upstream version 1.68.2+dfsg1. Signed-off-by: Daniel Baumann --- tests/ui/issues/issue-47715.rs | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 tests/ui/issues/issue-47715.rs (limited to 'tests/ui/issues/issue-47715.rs') diff --git a/tests/ui/issues/issue-47715.rs b/tests/ui/issues/issue-47715.rs new file mode 100644 index 000000000..b8088c18d --- /dev/null +++ b/tests/ui/issues/issue-47715.rs @@ -0,0 +1,28 @@ +trait Foo {} + +trait Bar {} + +trait Iterable { + type Item; +} + +struct Container> { + //~^ ERROR `impl Trait` only allowed in function and inherent method return types + field: T +} + +enum Enum> { + //~^ ERROR `impl Trait` only allowed in function and inherent method return types + A(T), +} + +union Union + Copy> { + //~^ ERROR `impl Trait` only allowed in function and inherent method return types + x: T, +} + +type Type> = T; +//~^ ERROR `impl Trait` only allowed in function and inherent method return types + +fn main() { +} -- cgit v1.2.3