Re: [PATCH] rust: arc: remove unused PhantomData

From: Tamir Duberstein
Date: Wed Nov 06 2024 - 11:41:52 EST


On Wed, Nov 6, 2024 at 11:39 AM Miguel Ojeda
<miguel.ojeda.sandonis@xxxxxxxxx> wrote:
>
> On Wed, Nov 6, 2024 at 2:45 PM Tamir Duberstein <tamird@xxxxxxxxx> wrote:
> >
> > In that case, should we reconsider this patch?
>
> Either that [*] or we could at least add a comment explaining it is
> not required for drop check purposes but that we have it anyway for
> clarity.
>
> Starting to use `may_dangle` is a third option, but I agree we should
> avoid it unless we got at least an indication from upstream Rust that
> they want to stabilize it soon in that form (and probably only if we
> feel an actual need for it, since it is yet another `unsafe` use).
>
> [*] Well, not this patch exactly -- the commit message should be fixed
> to explain things properly (and likely the "Fixes" tag removed) and it
> should also mention it double-checked the effect on variance and auto
> traits.

The upstream changes to dropck predate the PR I linked up-thread which
landed in 2017. Since this Arc code was written in 2022, it never had
any effect. Isn't it proper to keep the "Fixes" tag?