structural_match bug: deep refs like & &B
leak use of PartialEq
#62307
Labels
C-bug
Category: This is a bug.
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
(Spawned off of investigation of #61188)
rust-lang/rfcs#1445 says that we're supposed to reject uses of consts with ADT's that don't implement
#[structural_match]
(i.e. ADT's that do not do#[derive(PartialEq, Eq)]
.Unfortunately, we did not quite finish the job. Consider the following code (play):
This prints:
but I would expect to see something like the error you get if you use constants of type
&B
instead of& &B
:The text was updated successfully, but these errors were encountered: