From mboxrd@z Thu Jan 1 00:00:00 1970 From: Claude Code Review Bot To: dri-devel-reviews@example.com Subject: Claude review: rust: auxiliary: sample: demonstrate ForLt with invariant Mutex type Date: Thu, 04 Jun 2026 12:08:39 +1000 Message-ID: In-Reply-To: <20260603011020.2073650-5-dakr@kernel.org> References: <20260603011020.2073650-1-dakr@kernel.org> <20260603011020.2073650-5-dakr@kernel.org> X-Mailer: Claude Code Patch Reviewer Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Patch Review Good sample code showing both patterns side by side. The `MutexData<'bound>= ` type with `Mutex<&'bound pci::Device>` is a natural invariant-type= example. The `match adev.id()` dispatch cleanly demonstrates: - `COVARIANT_DEV_ID` =E2=86=92 `registration_data::)>()` - `INVARIANT_DEV_ID` =E2=86=92 `registration_data_with::), _>(|data| { ... })` **Minor observation:** The `#[pin]` annotation on `_reg1` in `ParentData`: ```rust #[pin_data] struct ParentData<'bound> { _reg0: auxiliary::Registration<'bound, CovariantForLt!(Data<'_>)>, #[pin] _reg1: auxiliary::Registration<'bound, ForLt!(MutexData<'_>)>, } ``` `Registration` itself doesn't seem to require structural pinning (it stores= the data in a `KBox`). The `#[pin]` may be needed here because `try_pin_in= it!` is used and the initializer for `_reg1` is a `PinInit`, but it's worth= confirming this is necessary vs. just conservative. --- Generated by Claude Code Patch Reviewer