diff options
| author | Ngo Iok Ui <wusyong9104@gmail.com> | 2020-11-21 13:47:09 +0800 |
|---|---|---|
| committer | Ngo Iok Ui <wusyong9104@gmail.com> | 2020-11-21 13:47:09 +0800 |
| commit | bc43380297c38f8cc888ce3e92fe20de9afbe50e (patch) | |
| tree | f829f04ced2961c5c778bfd214be59681274d689 | |
| parent | ef34e067817448d8ffbb9ac70e97699bf8b7566e (diff) | |
| download | rust-bc43380297c38f8cc888ce3e92fe20de9afbe50e.tar.gz rust-bc43380297c38f8cc888ce3e92fe20de9afbe50e.zip | |
Fix comments of toogeneris test
| -rw-r--r-- | src/test/ui/consts/issue-79137-toogeneric.rs | 4 | ||||
| -rw-r--r-- | 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 b2c62099de5..456035458cf 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 945bfa452c7..579e6aa09bd 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::<T>::VALUE, GetVariantCount::<T>::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::<T>::VALUE, GetVariantCount::<T>::VALUE) | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
