Re: [PATCH v2] rust_binder: add ownership assertion to Node::add_death
From: Alice Ryhl
Date: Tue Jun 16 2026 - 03:17:30 EST
On Fri, Jun 12, 2026 at 12:26 AM George Androutsopoulos
<georgeandrout13@xxxxxxxxx> wrote:
>
> On Thu, Jun 11, 2026 at 3:42 AM Alice Ryhl <aliceryhl@xxxxxxxxxx> wrote:
> > If this assertion fails we should not continue. Either use a full panic,
> > or do a warn_on! and return without adding it.
>
> Thank you for the feedback. Would you prefer we go back to the original patch
> suggestion with the assert!() that contains the message, without pr_warn()?
>
> assert!(
> core::ptr::eq(self, &**death.node),
> "attempt to add NodeDeath to the wrong death list"
> );
Doing an assert is fine, thanks.
Alice