Likely unintentionally stabilized support for inhabitedness checks to permeate Pin
#133885
Labels
C-bug
Category: This is a bug.
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
T-lang
Relevant to the language team, which will review and decide on the PR/issue.
this compiles successfully since 1.82
The issue with this is that generally, the check does not look through private implementation details. However, the field of
Pin
is technically public (only hidden and unstable) in order to support thepin!
macro.I would have expected the above code to still fail compiling. It’s quite unlikely that anyone depends on this behavior already, because
Pin
isn’t supposed to be used with non-pointers anyway.This could be fixed by changing the inhabitedness check to treat unstable fields like private fields.
Alternatively, if kept as-is, we should add a test case for this so we at least notice the breakage if
Pin
is ever re-structured to no longer using a public field.cc @Nadrieril, I guess
The text was updated successfully, but these errors were encountered: