Fix comments of toogeneris test

This commit is contained in:
Ngo Iok Ui 2020-11-21 13:47:09 +08:00
parent ef34e06781
commit bc43380297
No known key found for this signature in database
GPG Key ID: ECDEF001BA5D2F54
2 changed files with 3 additions and 5 deletions

View File

@ -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)]

View File

@ -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)
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^