-// 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)]
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)
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^