Open cafce25 opened 1 week ago
@rustbot label +T-compiler +F-effects -needs-triage
The PartialEq
impl for TypeId
is not marked as const and as such can't be used in const contexts. const_type_id
only enables creating a TypeId
in const contexts, not comparing it.
I tried to create a function that statically computes if two type parameters are the same:
Depending on whether the type of
T1
andT2
is the same the function should be able to producetrue
orfalse
at compile time.Instead, the compiler throws the following error:
Meta
rustc --version
: