]>
git.proxmox.com Git - rustc.git/blob - src/test/ui/consts/issue-79137-monomorphic.rs
3 // Verify that variant count intrinsic can still evaluate for types like `Option<T>`.
5 #![feature(variant_count)]
7 pub struct GetVariantCount
<T
>(T
);
9 impl<T
> GetVariantCount
<T
> {
10 pub const VALUE
: usize = std
::mem
::variant_count
::<T
>();
13 const fn check_variant_count
<T
>() -> bool
{
14 matches
!(GetVariantCount
::<Option
<T
>>::VALUE
, GetVariantCount
::<Option
<()>>::VALUE
)
18 assert
!(check_variant_count
::<()>());