From bc43380297c38f8cc888ce3e92fe20de9afbe50e Mon Sep 17 00:00:00 2001 From: Ngo Iok Ui Date: Sat, 21 Nov 2020 13:47:09 +0800 Subject: [PATCH] Fix comments of toogeneris test --- src/test/ui/consts/issue-79137-toogeneric.rs | 4 +--- src/test/ui/consts/issue-79137-toogeneric.stderr | 4 ++-- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/src/test/ui/consts/issue-79137-toogeneric.rs b/src/test/ui/consts/issue-79137-toogeneric.rs index b2c62099de56..456035458cfc 100644 --- a/src/test/ui/consts/issue-79137-toogeneric.rs +++ b/src/test/ui/consts/issue-79137-toogeneric.rs @@ -1,6 +1,4 @@ -// The instrinsic call for variant count should exhaustively match on `tp_ty` and forbid -// `ty::Projection`, `ty::Opaque`, `ty::Param`, `ty::Bound`, `ty::Placeholder` and `ty::Infer` -// variant. This test checks that it will fail if it's too generic. +// Test that `variant_count` only gets evaluated once the type is concrete enough. #![feature(variant_count)] diff --git a/src/test/ui/consts/issue-79137-toogeneric.stderr b/src/test/ui/consts/issue-79137-toogeneric.stderr index 945bfa452c70..579e6aa09bdb 100644 --- a/src/test/ui/consts/issue-79137-toogeneric.stderr +++ b/src/test/ui/consts/issue-79137-toogeneric.stderr @@ -1,11 +1,11 @@ error: constant pattern depends on a generic parameter - --> $DIR/issue-79137-toogeneric.rs:14:43 + --> $DIR/issue-79137-toogeneric.rs:12:43 | LL | matches!(GetVariantCount::::VALUE, GetVariantCount::::VALUE) | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ error: constant pattern depends on a generic parameter - --> $DIR/issue-79137-toogeneric.rs:14:43 + --> $DIR/issue-79137-toogeneric.rs:12:43 | LL | matches!(GetVariantCount::::VALUE, GetVariantCount::::VALUE) | ^^^^^^^^^^^^^^^^^^^^^^^^^^^