From 698f8c2f01ea549d77d7dc3338a12e04c11057b9 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Wed, 17 Apr 2024 14:02:58 +0200 Subject: Adding upstream version 1.64.0+dfsg1. Signed-off-by: Daniel Baumann --- src/test/ui/qualified/qualified-path-params.rs | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 src/test/ui/qualified/qualified-path-params.rs (limited to 'src/test/ui/qualified/qualified-path-params.rs') diff --git a/src/test/ui/qualified/qualified-path-params.rs b/src/test/ui/qualified/qualified-path-params.rs new file mode 100644 index 000000000..e8a95a460 --- /dev/null +++ b/src/test/ui/qualified/qualified-path-params.rs @@ -0,0 +1,25 @@ +// Check that qualified paths with type parameters +// fail during type checking and not during parsing + +struct S; + +trait Tr { + type A; +} + +impl Tr for S { + type A = S; +} + +impl S { + fn f() {} +} + +fn main() { + match 10 { + ::A::f:: => {} + //~^ ERROR expected unit struct, unit variant or constant, found associated function + 0 ..= ::A::f:: => {} + //~^ ERROR only `char` and numeric types are allowed in range + } +} -- cgit v1.2.3