From c0c48a6677fbee62db3816643200fb2a755d715b Mon Sep 17 00:00:00 2001 From: Mazdak Farrokhzad Date: Sun, 9 Jun 2019 03:59:18 +0200 Subject: [PATCH] type-alias-enum-variants-priority-3: describe the test. --- .../type-alias-enum-variants-priority-3.rs | 3 +++ .../type-alias-enum-variants-priority-3.stderr | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/test/ui/type-alias-enum-variants/type-alias-enum-variants-priority-3.rs b/src/test/ui/type-alias-enum-variants/type-alias-enum-variants-priority-3.rs index ff0bfee1ecc..11f4b05d0bf 100644 --- a/src/test/ui/type-alias-enum-variants/type-alias-enum-variants-priority-3.rs +++ b/src/test/ui/type-alias-enum-variants/type-alias-enum-variants-priority-3.rs @@ -1,3 +1,6 @@ +// Check that the compiler will resolve `::V` to the variant `V` in the type namespace +// but will reject this because `enum` variants do not exist in the type namespace. + enum E { V } diff --git a/src/test/ui/type-alias-enum-variants/type-alias-enum-variants-priority-3.stderr b/src/test/ui/type-alias-enum-variants/type-alias-enum-variants-priority-3.stderr index f179fd82d75..74e89076857 100644 --- a/src/test/ui/type-alias-enum-variants/type-alias-enum-variants-priority-3.stderr +++ b/src/test/ui/type-alias-enum-variants/type-alias-enum-variants-priority-3.stderr @@ -1,5 +1,5 @@ error: expected type, found variant `V` - --> $DIR/type-alias-enum-variants-priority-3.rs:5:15 + --> $DIR/type-alias-enum-variants-priority-3.rs:8:15 | LL | fn check() -> ::V {} | ^^^^^^