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: alloc: add `KBox::into_nonnull` Date: Fri, 27 Feb 2026 15:11:56 +1000 Message-ID: In-Reply-To: <20260224-unique-ref-v16-1-c21afcb118d3@kernel.org> References: <20260224-unique-ref-v16-0-c21afcb118d3@kernel.org> <20260224-unique-ref-v16-1-c21afcb118d3@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 Simple, clean utility method. No issues. ```rust pub fn into_nonnull(b: Self) -> NonNull { // SAFETY: `KBox::into_raw` returns a valid pointer. unsafe { NonNull::new_unchecked(Self::into_raw(b)) } } ``` The SAFETY comment is correct =E2=80=94 `KBox::into_raw` guarantees a non-n= ull valid pointer (same contract as `Box::into_raw` in std). --- Generated by Claude Code Patch Reviewer